Package com.asakusafw.runtime.directio

Examples of com.asakusafw.runtime.directio.DirectDataSourceRepository$NodePath


        boolean succeed = true;
        if (fs.exists(commitMark) == false) {
            // FIXME cleanup
            return false;
        }
        DirectDataSourceRepository repo = getRepository();
        for (String containerPath : repo.getContainerPaths()) {
            String datasourceId = repo.getRelatedId(containerPath);
            try {
                DirectDataSource datasource = repo.getRelatedDataSource(containerPath);
                OutputTransactionContext context = HadoopDataSourceUtil.createContext(executionId, datasourceId);
                datasource.commitTransactionOutput(context);
                datasource.cleanupTransactionOutput(context);
            } catch (IOException e) {
                succeed = false;
View Full Code Here


    public void loadRepository() throws Exception {
        Configuration conf = new Configuration();
        conf.set(key("testing"), MockHadoopDataSource.class.getName());
        conf.set(key("testing", "path"), "testing");
        conf.set(key("testing", "hello"), "world");
        DirectDataSourceRepository repo = HadoopDataSourceUtil.loadRepository(conf);
        DirectDataSource ds = repo.getRelatedDataSource("testing");
        assertThat(ds, instanceOf(MockHadoopDataSource.class));
        MockHadoopDataSource mock = (MockHadoopDataSource) ds;
        assertThat(mock.conf, is(notNullValue()));
        assertThat(mock.profile.getPath(), is("testing"));
    }
View Full Code Here

                        "Failed to delete commit mark (executionId={0}, path={1})",
                        executionId,
                        commitMark));
            }
        }
        DirectDataSourceRepository repo = getRepository();
        for (String containerPath : repo.getContainerPaths()) {
            String datasourceId = repo.getRelatedId(containerPath);
            try {
                DirectDataSource datasource = repo.getRelatedDataSource(containerPath);
                OutputTransactionContext context = HadoopDataSourceUtil.createContext(executionId, datasourceId);
                datasource.cleanupTransactionOutput(context);
            } catch (IOException e) {
                succeed = false;
                LOG.error(MessageFormat.format(
View Full Code Here

    ContentRegionSearcher2 searcher = new ContentRegionSearcher2();
    HTMLNode nodes = searcher.extractContent(document, url, false);

    NodePathParser pathParser = new NodePathParser();
    //    for(int i = 0; i < nodes.size(); i++) {
    NodePath path = pathParser.toPath(nodes);  
    if(path == null) return;
    short selectType = PathConfirmDialog.YES;
    handler.traverseTree(tree, path, TreeHandler.MARK, selectType);
    //    }
  }
View Full Code Here

  }
 
  public void setNode(HTMLNode node){
    setName(node.getName().toString());
    setValue(new String(node.getValue()));   
    NodePath path = new NodePathParser().toPath(node);
    setPathName(path.toString());
    if(node.getChildren() != null ){
      setTotalChildren(node.getChildren().size());
      setAttributes(node.getAttributes());
    }
    shell.pack();
View Full Code Here

    }
  }

  private void search(String start, String end){
    try{
      NodePath path = webClient.findNodeByText(document.getRoot(), start, end);  
      if(path == null) return;
      short selectType = PathConfirmDialog.YES;
      handler.traverseTree(tree, path, TreeHandler.NONE, selectType);     
    } catch(Exception exp){
      ClientLog.getInstance().setMessage(tree.getShell(), exp);
View Full Code Here

          NodePathParser pathParser = new NodePathParser();
          if(hyperlinkUtil == null) hyperlinkUtil = new HyperLinkUtil();
          HTMLNode header = null;
          HTMLNode body = null;
          try {
            NodePath nodePath  = pathParser.toPath("HEAD");
            header = extractor.lookNode(document.getRoot(), nodePath);
            nodePath  = pathParser.toPath("BODY");
            body = extractor.lookNode(document.getRoot(), nodePath);
          } catch (Exception e) {
            ClientLog.getInstance().setException(getShell(), e);
View Full Code Here

   
    HTMLExtractor extractor  = new HTMLExtractor();
    NodePathParser pathParser = new NodePathParser();
   
    try {
      NodePath nodePath  = pathParser.toPath(txt);
      HTMLNode node = extractor.lookNode(document.getRoot(), nodePath);
      if(node == null) return;
      if(node.isNode(Name.CONTENT)
          || node.isNode(Name.COMMENT)
          || node.isNode(Name.UNKNOWN)) {
        browser.setText(node.getTextValue());
        return;
      }
     
      NodePath headerPath  = pathParser.toPath("HEAD");
      HTMLNode header = extractor.lookNode(document.getRoot(), headerPath);
   
      if(toolbar.isShowAll()) {
        if(hyperlinkUtil == null) hyperlinkUtil = new HyperLinkUtil();
        try {
View Full Code Here

    NodePathParser pathParser = new NodePathParser();
    for(TreeItem item : items) {
      String pathIndex = handler.getConfig(item);
      try {
        NodeInfoViewer viewer = new NodeInfoViewer(getShell(), x, y);
        NodePath nodePath = pathParser.toPath(pathIndex);
        HTMLNode node = extractor.lookNode(document.getRoot(), nodePath);
        viewer.setNode(node);  
        x += 10;
        y += 10;
        nodeViewers.add(viewer);
View Full Code Here

    List<String> removePaths = new ArrayList<String>();
    NodePathParser pathParser = new NodePathParser();
    if(paths != null) {
      short selectType = PathConfirmDialog.YES;
      for(String path : paths) {
        NodePath nodePath = pathParser.toPath(path);
        selectType = handler.traverseTree(tree, nodePath, path, style, selectType);
        if(selectType == PathConfirmDialog.YES
            || selectType == PathConfirmDialog.YES_TO_ALL) {
          removePaths.add(path);
        }
View Full Code Here

TOP

Related Classes of com.asakusafw.runtime.directio.DirectDataSourceRepository$NodePath

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.