@Override public int getCurrentSliceNum() { return delegate.getCurrentSliceNum(); }
@Override public void prepare( FlowProcess flowProcess, OperationCall<Context> operationCall ) { super.prepare( flowProcess, operationCall ); Context context = new Context(); operationCall.setContext( context ); int numTasks = flowProcess.getNumProcessSlices(); int taskNum = flowProcess.getCurrentSliceNum(); context.limit = (long) Math.floor( (double) limit / (double) numTasks ); long remainingLimit = limit % numTasks; // evenly divide limits across tasks context.limit += taskNum < remainingLimit ? 1 : 0; }
public Hadoop2TezStreamGraph( Hadoop2TezFlowProcess currentProcess, FlowNode flowNode, Map<String, LogicalInput> inputMap, Map<String, LogicalOutput> outputMap ) { super( currentProcess, flowNode ); this.inputMap = inputMap; this.outputMap = outputMap; buildGraph(); setTraps(); setScopes(); printGraph( node.getID(), node.getName(), flowProcess.getCurrentSliceNum() ); bind(); printBoundGraph( node.getID(), node.getName(), flowProcess.getCurrentSliceNum() ); }
public Hadoop2TezStreamGraph( Hadoop2TezFlowProcess currentProcess, FlowNode flowNode, Map<String, LogicalInput> inputMap, Map<String, LogicalOutput> outputMap ) { super( currentProcess, flowNode ); this.inputMap = inputMap; this.outputMap = outputMap; buildGraph(); setTraps(); setScopes(); printGraph( node.getID(), node.getName(), flowProcess.getCurrentSliceNum() ); bind(); printBoundGraph( node.getID(), node.getName(), flowProcess.getCurrentSliceNum() ); }
public SourceStreamGraph(FlowProcess flowProcess, FlowNode node, Tap tap) { super(flowProcess, node); sourceStage = translateHead(tap, flowProcess); setTraps(); setScopes(); printGraph( node.getID(), "source", flowProcess.getCurrentSliceNum() ); bind(); }