/** * Enumerate numLevels of ancestors by putting them in the stack and dispatch * the current node. * @param nd current operator in the ancestor tree * @param level how many level of ancestors included in the stack * @param stack operator stack * @throws SemanticException */ @SuppressWarnings("unchecked") private void walk(Node nd, int level, Stack<Node> stack) throws SemanticException { List<Operator<? extends OperatorDesc>> parents = ((Operator<? extends OperatorDesc>)nd).getParentOperators(); if (level >= numLevels || parents == null || parents.isEmpty()) { dispatch(stack.peek(), stack); return; } for(Node parent : parents) { stack.add(0, parent); walk(parent, level+1, stack); stack.remove(0); } } }
walk(nd, 0, opStack); if (nodeOutput != null && getDispatchedList().contains(nd)) { nodeOutput.put(nd, retMap.get(nd));
Dispatcher disp = new DefaultRuleDispatcher(UnionProcFactory.getNoUnion(), opRules, uCtx); LevelOrderWalker ogw = new LevelOrderWalker(disp); ogw.setNodeTypes(UnionOperator.class); ogw.startWalking(topNodes, null); pCtx.setUCtx(uCtx); ogw = new LevelOrderWalker(disp); ogw.setNodeTypes(FileSinkOperator.class); ogw.startWalking(topNodes, null);
GraphWalker ogw = new LevelOrderWalker(disp, 2);
Dispatcher disp = new DefaultRuleDispatcher(UnionProcFactory.getNoUnion(), opRules, uCtx); LevelOrderWalker ogw = new LevelOrderWalker(disp); ogw.setNodeTypes(UnionOperator.class); ogw.startWalking(topNodes, null); pCtx.setUCtx(uCtx); ogw = new LevelOrderWalker(disp); ogw.setNodeTypes(FileSinkOperator.class); ogw.startWalking(topNodes, null);
GraphWalker ogw = new LevelOrderWalker(disp, 0);
/** * Enumerate numLevels of ancestors by putting them in the stack and dispatch * the current node. * @param nd current operator in the ancestor tree * @param level how many level of ancestors included in the stack * @param stack operator stack * @throws SemanticException */ @SuppressWarnings("unchecked") private void walk(Node nd, int level, Stack<Node> stack) throws SemanticException { List<Operator<? extends OperatorDesc>> parents = ((Operator<? extends OperatorDesc>)nd).getParentOperators(); if (level >= numLevels || parents == null || parents.isEmpty()) { dispatch(stack.peek(), stack); return; } for(Node parent : parents) { stack.add(0, parent); walk(parent, level+1, stack); stack.remove(0); } } }
GraphWalker ogw = new LevelOrderWalker(disp, 2);
walk(nd, 0, opStack); if (nodeOutput != null && getDispatchedList().contains(nd)) { nodeOutput.put(nd, retMap.get(nd));
GraphWalker ogw = new LevelOrderWalker(disp, 0);
GraphWalker ogw = new LevelOrderWalker(disp, 0);
GraphWalker ogw = new LevelOrderWalker(disp, 0);
GraphWalker ogw = new LevelOrderWalker(disp, 2);
GraphWalker ogw = new LevelOrderWalker(disp, 2);