public void receive( Duct previous, int ordinal, Incoming incoming ) { next.receive( this, ordinal, (Outgoing) incoming ); } }
public void bind() { Iterator<Duct> iterator = getTopologicalOrderIterator(); // build the actual processing graph while( iterator.hasNext() ) iterator.next().bind( this ); iterator = getReversedTopologicalOrderIterator(); // initialize all the ducts while( iterator.hasNext() ) iterator.next().initialize(); }
@Override public void run(Object input) throws Throwable { if(!this.nextStarted) { next.start(this); this.nextStarted = true; } try { Tuple tuple = (Tuple)input; tupleEntry.setTuple(tuple); flowProcess.increment( StepCounters.Tuples_Read, 1 ); flowProcess.increment(SliceCounters.Tuples_Read, 1); } catch( OutOfMemoryError error ) { handleReThrowableException("out of memory, try increasing task memory allocation", error); } catch( CascadingException exception ) { handleException(exception, null); } catch( Throwable throwable ) { handleException(new DuctException("internal error", throwable), null); } next.receive( this, tupleEntry ); } }
@Override public void start( Duct previous ) { next.start( previous ); }
@Override public void complete( Duct previous ) { next.complete( previous ); } }
/** Calls cleanup starting at the head and working forwards */ public void cleanup() { TopologicalOrderIterator<Duct, Integer> iterator = getTopologicalOrderIterator(); while( iterator.hasNext() ) iterator.next().cleanup(); }
@Override public void start( Duct previous ) { next.start( this ); }
@Override public void complete( Duct previous ) { for( int i = 0; i < allNext.length; i++ ) allNext[ i ].complete( previous ); } }
@Override public void completeGroup( Duct previous, Outgoing outgoing ) { next.receive( previous, 0, outgoing ); } }
@Override public void start( Duct previous ) { for( int i = 0; i < allNext.length; i++ ) allNext[ i ].start( previous ); }
public void complete( Duct previous ) { next.complete( this ); }
public void receive( Duct previous, int ordinal, Incoming incoming ) { // override ordinal value next.receive( previous, this.ordinal, (Outgoing) incoming ); }
@Override public synchronized void complete( Duct previous ) { count++; if( count < size ) return; try { Grouping grouping = new Grouping(); grouping.joinIterator = list.listIterator(); next.start( this ); next.receive( this, 0, (Outgoing) grouping ); next.complete( this ); } finally { list.clear(); count = 0; } }
public void start( Duct previous ) { next.start( this ); }
public void passOn( Duct next ) { next.complete( previous ); }
@Override public void receive( Duct previous, int ordinal, Incoming incoming ) { for( int i = 0; i < allNext.length; i++ ) allNext[ i ].receive( previous, i, incoming ); }