Examples of Node


Examples of org.apache.hadoop.hive.ql.lib.Node

    final Set<String> actualColumnNames = new HashSet<String>();
    if(!isNoArgumentMacro) {
      /*
       * Walk down expression to see which arguments are actually used.
       */
      Node expression = (Node) ast.getChild(2);
      PreOrderWalker walker = new PreOrderWalker(new Dispatcher() {
        @Override
        public Object dispatch(Node nd, Stack<Node> stack, Object... nodeOutputs)
            throws SemanticException {
          if(nd instanceof ASTNode) {

Examples of org.apache.hadoop.net.Node

      if (job.nonRunningMapCache == null) return -1;
     
      // We fall to linear scan of the list (III above) if we have misses in the
      // above caches
 
      Node node = jobTracker.getNode(host);

      int maxLevel = job.getMaxCacheLevel();
     
      //
      // I) Non-running TIP :
      //
 
      // 1. check from local node to the root [bottom up cache lookup]
      //    i.e if the cache is available and the host has been resolved
      //    (node!=null)
      if (node != null) {
        Node key = node;
        int level = 0;
        // maxCacheLevel might be greater than this.maxLevel if findNewMapTask is
        // called to schedule any task (local, rack-local, off-switch or speculative)
        // tasks or it might be NON_LOCAL_CACHE_LEVEL (i.e. -1) if findNewMapTask is
        //  (i.e. -1) if findNewMapTask is to only schedule off-switch/speculative
        // tasks
        int maxLevelToSchedule = Math.min(maxCacheLevel, maxLevel);
        for (level = 0;level < maxLevelToSchedule; ++level) {
          List <TaskInProgress> cacheForLevel = job.nonRunningMapCache.get(key);
          if (hasUnlaunchedTask(cacheForLevel)) {
            return level;
          }
          key = key.getParent();
        }
       
        // Check if we need to only schedule a local task (node-local/rack-local)
        if (level == maxCacheLevel) {
          return -1;
        }
      }
 
      //2. Search breadth-wise across parents at max level for non-running
      //   TIP if
      //     - cache exists and there is a cache miss
      //     - node information for the tracker is missing (tracker's topology
      //       info not obtained yet)
 
      // collection of node at max level in the cache structure
      Collection<Node> nodesAtMaxLevel = jobTracker.getNodesAtMaxLevel();
 
      // get the node parent at max level
      Node nodeParentAtMaxLevel =
        (node == null) ? null : JobTracker.getParentNode(node, maxLevel - 1);
     
      for (Node parent : nodesAtMaxLevel) {
 
        // skip the parent that has already been scanned
        if (parent == nodeParentAtMaxLevel) {
          continue;
        }
 
        List<TaskInProgress> cache = job.nonRunningMapCache.get(parent);
        if (hasUnlaunchedTask(cache)) {
          return maxLevel-1;
        }
      }
 
      // 3. Search non-local tips for a new task
      if (hasUnlaunchedTask(job.nonLocalMaps))
        return 0;
     
      //
      // II) Running TIP :
      //
  
      if (job.getMapSpeculativeExecution()) {
        long time = System.currentTimeMillis();
        float avgProg = job.status.mapProgress();
 
        // 1. Check bottom up for speculative tasks from the running cache
        if (node != null) {
          Node key = node;
          for (int level = 0; level < maxLevel; ++level) {
            Set<TaskInProgress> cacheForLevel = job.runningMapCache.get(key);
            if (cacheForLevel != null) {
              for (TaskInProgress tip: cacheForLevel) {
                if (tip.isRunning() && tip.hasSpeculativeTask(time, avgProg)) {
                  return level;
                }
              }
            }
            key = key.getParent();
          }
        }
 
        // 2. Check breadth-wise for speculative tasks
       

Examples of org.apache.helix.taskexecution.Dag.Node

    }
  }

  private static Dag getAnalyticsDag() {
    Dag dag = new Dag();
    dag.addNode(new Node("filterImps", 10, ""));
    dag.addNode(new Node("filterClicks", 5, ""));
    dag.addNode(new Node("impClickJoin", 10, "filterImps,filterClicks"));
    dag.addNode(new Node("impCountsByGender", 10, "filterImps"));
    dag.addNode(new Node("impCountsByCountry", 10, "filterImps"));
    dag.addNode(new Node("clickCountsByGender", 5, "impClickJoin"));
    dag.addNode(new Node("clickCountsByCountry", 5, "impClickJoin"));

    dag.addNode(new Node("report", 1,
        "impCountsByGender,impCountsByCountry,clickCountsByGender,clickCountsByCountry"));

    return dag;
  }

Examples of org.apache.hivemind.conditional.Node

        if (_conditionalExpressionParser == null)
            _conditionalExpressionParser = new Parser();

        try
        {
            Node node = _conditionalExpressionParser.parse(expression);

            return node.evaluate(new EvaluationContextImpl(module.getClassResolver()));
        }
        catch (RuntimeException ex)
        {
            _errorHandler.error(_log, ex.getMessage(), location, ex);

Examples of org.apache.jackrabbit.api.jsr283.Node

        String srcPath = versionableNode.getPath();
        String dstPath = getProperty("destination");
        wsp.copy(srcPath, dstPath);

        // check versionable
        Node v = (Node) ((org.apache.jackrabbit.api.jsr283.Session) superuser).getNode(dstPath);
        assertTrue("Copied Node.isNodeType(mix:simpleVersionable) must return true.",
                v.isNodeType(mixSimpleVersionable));
        assertFalse("Copied Node.isNodeType(mix:versionable) must return false.",
                v.isNodeType(mixVersionable));

        // check different version history
        VersionHistory vh1 = vMgr.getVersionHistory(srcPath);
        VersionHistory vh2 = vMgr.getVersionHistory(dstPath);
        assertFalse("Copied node needs a new version history.", vh1.isSame(vh2));

Examples of org.apache.jackrabbit.mk.model.Node

    @Override
    public void compare(final NodeState before, final NodeState after,
            final NodeStateDiff diff) {
        // OAK-46: Efficient diffing of large child node lists

        Node beforeNode = ((StoredNodeAsState) before).unwrap();
        Node afterNode = ((StoredNodeAsState) after).unwrap();

        beforeNode.diff(afterNode, new NodeDiffHandler() {
            @Override
            public void propAdded(String propName, String value) {
                diff.propertyAdded(after.getProperty(propName));

Examples of org.apache.jackrabbit.mongomk.api.model.Node

    }

    public void setSeed(String path, String json) throws Exception {
        this.path = path;
        String all = String.format("{ \"%s\" : %s }", PathUtils.getName(path), json);
        Node node = NodeBuilder.build(all, path);
        descendants = new Node[node.getChildNodeCount()];
        int i = 0;
        for (Iterator<Node> it = node.getChildNodeEntries(0, -1); it.hasNext(); ) {
            descendants[i++] = it.next();
        }
        random = new Random();
    }

Examples of org.apache.james.mime4j.field.address.parser.Node

    return new AddressList(list, true);
  }

  private Address buildAddress(ASTaddress node) {
    ChildNodeIterator it = new ChildNodeIterator(node);
    Node n = it.nextNode();
    if (n instanceof ASTaddr_spec) {
      return buildAddrSpec((ASTaddr_spec)n);
    }
    else if (n instanceof ASTangle_addr) {
      return buildAngleAddr((ASTangle_addr)n);
    }
    else if (n instanceof ASTphrase) {
      String name = buildString((ASTphrase)n, false);
      Node n2 = it.nextNode();
      if (n2 instanceof ASTgroup_body) {
        return new Group(name, buildGroupBody((ASTgroup_body)n2));
      }
      else if (n2 instanceof ASTangle_addr) {
                name = DecoderUtil.decodeEncodedWords(name);

Examples of org.apache.jasper.compiler.Node

    }
    public static void evaluateNodes(Node.Nodes nodes, SmapStratum s) {
        if( nodes != null && nodes.size()>0) {
            int numChildNodes = nodes.size();
            for( int i = 0; i < numChildNodes; i++ ) {
                Node n = nodes.getNode( i );
    if (!n.isDummy()) {
        Mark mark = n.getStart();

        if (verbose) {
      System.out.println("Mark(start): line=" +
             mark.getLineNumber() +
             " col="+mark.getColumnNumber() +
             "Node: begLine=" +
             n.getBeginJavaLine() +
             " endLine="+n.getEndJavaLine());
        }
        String unqualifiedName = unqualify(mark.getFile());
        s.addFile(unqualifiedName);
        s.addLineData(mark.getLineNumber(),
          unqualifiedName,
          1,
          n.getBeginJavaLine(),
          n.getEndJavaLine() - n.getBeginJavaLine());
    }
    evaluateNodes(nodes.getNode(i).getBody(), s);
            }
        }
    }

Examples of org.apache.jetspeed.page.document.Node

    private void securityConstraintAction(String action, String constraint,
            String oldConstraintName)
    {
        SiteTreeNode node = getUserSelectedNode();
        Node jetspeedNode = null;
        PageManager pageManager = getServiceLocator().getPageManager();
        if (node.getDocType() == SiteTreeNode.FileType.Folder)
        {
            jetspeedNode = (Node) getJetspeedFolder(node.getNodePath());
            if (action.equals(ADD_ACTION) || action.equals(SAVE_ACTION))
TOP
Copyright © 2018 www.massapi.com. 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.