protected Operator( Operation operation ) { this.operation = operation; verifyOperation(); }
static Pipe[] resolvePreviousAll( Pipe... pipes ) { Pipe[] resolved = new Pipe[ pipes.length ]; for( int i = 0; i < pipes.length; i++ ) resolved[ i ] = resolvePrevious( pipes[ i ] ); return resolved; }
/** * Creates a new GroupBy instance that will first merge the given pipes, then group on the given groupFields field names. * * @param groupName of type String * @param lhsPipe of type Pipe * @param rhsPipe of type Pipe * @param groupFields of type Fields */ public GroupBy( String groupName, Pipe lhsPipe, Pipe rhsPipe, Fields groupFields ) { super( groupName, Pipe.pipes( lhsPipe, rhsPipe ), groupFields ); }
@Test public void testGetFirstJoin() { Pipe pipeFirst = new Pipe( "first" ); Pipe pipeSecond = new Pipe( "second" ); Pipe pipe = new CoGroup( pipeFirst, pipeSecond ); pipe = new Pipe( pipe ); pipe = new Pipe( pipe ); pipe = new Pipe( pipe ); assertTrue( pipe.getHeads()[ 0 ] == pipeFirst || pipe.getHeads()[ 0 ] == pipeSecond ); }
@Test public void testGetNames() { Pipe pipe = new Pipe( "first" ); pipe = new NestedSubAssembly( pipe ); Pipe pipe1 = new Pipe( "fifth", ( (SubAssembly) pipe ).getTails()[ 0 ] ); Pipe pipe2 = new Pipe( "sixth", ( (SubAssembly) pipe ).getTails()[ 1 ] ); assertEquals( 6, Pipe.names( pipe1, pipe2 ).length ); assertEquals( 1, Pipe.named( "second", pipe1, pipe2 ).length ); assertEquals( 1, Pipe.named( "sixth", pipe1, pipe2 ).length ); assertEquals( pipe2, Pipe.named( "sixth", pipe1, pipe2 )[ 0 ] ); } }
public HadoopGroupGate( FlowProcess flowProcess, Splice splice, IORole role ) { super( flowProcess, splice, role ); isBufferJoin = splice.getJoiner() instanceof BufferJoin; }
@Override public FlowElement create( ElementGraph graph, FlowElement flowElement ) { return new Boundary(); } }
@Override public String getName() { return Pipe.id( this ); }
Fields resolveOutgoingValuesSelector( Set<Scope> incomingScopes, Fields argumentFields, Fields declaredFields ) { try { return resolveOutgoingSelector( incomingScopes, argumentFields, declaredFields ); } catch( Exception exception ) { if( exception instanceof OperatorException ) throw (OperatorException) exception; throw new OperatorException( this, "could not resolve outgoing values selector in: " + this, exception ); } } }
protected SubAssembly( String name, Pipe[] previous ) { super( name ); setPrevious( previous ); }
/** * Method getTails returns all the tails of this SubAssembly object. These values are set by {@link #setTails(Pipe...)}. * * @return the tails (type Pipe[]) of this SubAssembly object. */ public Pipe[] getTails() { return getPrevious(); // just returns a clone of tails }
protected Operator( Pipe previous, Fields argumentSelector, Operation operation ) { super( previous ); this.operation = operation; this.argumentSelector = argumentSelector; verifyOperation(); }
protected Operator( Pipe previous, Operation operation, Fields outputSelector ) { super( previous ); this.operation = operation; this.outputSelector = outputSelector; verifyOperation(); }
protected Operator( String name, PlannerLevel plannerLevel, PlannedOperation operation, Fields outputSelector ) { super( name ); this.plannerLevel = plannerLevel; this.operation = operation; this.outputSelector = outputSelector; verifyOperation(); }
protected Operator( Pipe previous, PlannerLevel plannerLevel, PlannedOperation operation, Fields outputSelector ) { super( previous ); this.plannerLevel = plannerLevel; this.operation = operation; this.outputSelector = outputSelector; verifyOperation(); }
protected Operator( String name, Operation operation ) { super( name ); this.operation = operation; verifyOperation(); }
protected Operator( String name, Fields argumentSelector, Operation operation, Fields outputSelector ) { super( name ); this.operation = operation; this.argumentSelector = argumentSelector; this.outputSelector = outputSelector; verifyOperation(); }
protected Operator( Pipe previous, Operation operation ) { super( previous ); this.operation = operation; verifyOperation(); }
protected Operator( String name, Fields argumentSelector, PlannerLevel plannerLevel, PlannedOperation operation, Fields outputSelector ) { super( name ); this.plannerLevel = plannerLevel; this.operation = operation; this.argumentSelector = argumentSelector; this.outputSelector = outputSelector; verifyOperation(); }