/** * 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 ); }
/** * Creates a new GroupBy instance that will first merge the given pipes, then group on the given groupFields field names. * * @param lhsPipe of type Pipe * @param rhsPipe of type Pipe * @param groupFields of type Fields */ public GroupBy( Pipe lhsPipe, Pipe rhsPipe, Fields groupFields ) { super( Pipe.pipes( lhsPipe, rhsPipe ), groupFields ); }
/** * Constructor Splice creates a new Splice instance. * * @param spliceName of type String * @param pipe of type Pipe * @param groupFields of type Fields * @param sortFields of type Fields * @param reverseOrder of type boolean */ protected Splice( String spliceName, Pipe pipe, Fields groupFields, Fields sortFields, boolean reverseOrder ) { this( spliceName, Pipe.pipes( pipe ), groupFields, sortFields, reverseOrder ); }
/** * Constructor CompositeAggregator creates a new CompositeAggregator instance. * * @param pipe of type Pipe * @param groupingFields of type Fields * @param assemblies of type CompositeAggregator... */ @ConstructorProperties({"pipe", "groupingFields", "assemblies"}) public AggregateBy( Pipe pipe, Fields groupingFields, AggregateBy... assemblies ) { this( null, Pipe.pipes( pipe ), groupingFields, 0, assemblies ); }
/** * Constructor Unique creates a new Unique instance. * * @param name of type String * @param pipe of type Pipe * @param uniqueFields of type Fields * @param capacity of type int */ @ConstructorProperties({"name", "pipe", "uniqueFields", "capacity"}) public Unique( String name, Pipe pipe, Fields uniqueFields, int capacity ) { this( name, Pipe.pipes( pipe ), uniqueFields, capacity ); }
/** * Constructor CompositeAggregator creates a new CompositeAggregator instance. * * @param pipe of type Pipe * @param groupingFields of type Fields * @param capacity of type int * @param assemblies of type CompositeAggregator... */ @ConstructorProperties({"name", "pipe", "groupingFields", "capacity", "assemblies"}) public AggregateBy( String name, Pipe pipe, Fields groupingFields, int capacity, AggregateBy... assemblies ) { this( name, Pipe.pipes( pipe ), groupingFields, capacity, assemblies ); }
/** * Constructor CompositeAggregator creates a new CompositeAggregator instance. * * @param pipe of type Pipe * @param groupingFields of type Fields * @param capacity of type int * @param assemblies of type CompositeAggregator... */ @ConstructorProperties({"pipe", "groupingFields", "capacity", "assemblies"}) public AggregateBy( Pipe pipe, Fields groupingFields, int capacity, AggregateBy... assemblies ) { this( null, Pipe.pipes( pipe ), groupingFields, capacity, assemblies ); }
/** * Constructor FirstBy creates a new FirstBy instance. * * @param name of type String * @param pipe of type Pipe * @param groupingFields of type Fields * @param firstFields of type Fields * @param threshold of type int */ @ConstructorProperties({"name", "pipe", "groupingFields", "firstFields", "threshold"}) public FirstBy( String name, Pipe pipe, Fields groupingFields, Fields firstFields, int threshold ) { this( name, Pipe.pipes( pipe ), groupingFields, firstFields, threshold ); }
/** * Constructor CountBy creates a new CountBy instance. * * @param name of type String * @param pipe of type Pipe * @param groupingFields of type Fields * @param countField of type Fields * @param threshold of type int */ @ConstructorProperties({"name", "pipe", "groupingFields", "countField", "threshold"}) public CountBy( String name, Pipe pipe, Fields groupingFields, Fields countField, int threshold ) { this( name, Pipe.pipes( pipe ), groupingFields, countField, threshold ); }
/** * Constructor Unique creates a new Unique instance. * * @param name of type String * @param pipe of type Pipe * @param uniqueFields of type Fields * @param include of type Include * @param capacity of type int */ @ConstructorProperties({"name", "pipe", "uniqueFields", "include", "capacity"}) public Unique( String name, Pipe pipe, Fields uniqueFields, Include include, int capacity ) { this( name, Pipe.pipes( pipe ), uniqueFields, include, capacity ); }
/** * Constructor Splice creates a new Splice instance. * * @param lhs of type Pipe * @param lhsGroupFields of type Fields * @param rhs of type Pipe * @param rhsGroupFields of type Fields */ protected Splice( Pipe lhs, Fields lhsGroupFields, Pipe rhs, Fields rhsGroupFields ) { this( Pipe.pipes( lhs, rhs ), Fields.fields( lhsGroupFields, rhsGroupFields ) ); }
/** * Constructor HashJoin creates a new HashJoin instance. * * @param lhs * @param lhsJoinFields * @param rhs * @param rhsJoinFields */ @ConstructorProperties({"lhs", "lhsJoinFields", "rhs", "rhsJoinFields"}) public HashJoin( Pipe lhs, Fields lhsJoinFields, Pipe rhs, Fields rhsJoinFields ) { super( null, Pipe.pipes( lhs, rhs ), Fields.fields( lhsJoinFields, rhsJoinFields ), null, null ); }
/** * Constructor HashJoin creates a new HashJoin instance. * * @param joinName * @param lhs * @param lhsJoinFields * @param rhs * @param rhsJoinFields */ @ConstructorProperties({"joinName", "lhs", "lhsJoinFields", "rhs", "rhsJoinFields"}) public HashJoin( String joinName, Pipe lhs, Fields lhsJoinFields, Pipe rhs, Fields rhsJoinFields ) { super( joinName, Pipe.pipes( lhs, rhs ), Fields.fields( lhsJoinFields, rhsJoinFields ), null, null ); }
/** * Constructor HashJoin creates a new HashJoin instance. * * @param lhs * @param lhsJoinFields * @param rhs * @param rhsJoinFields * @param declaredFields */ @ConstructorProperties({"lhs", "lhsJoinFields", "rhs", "rhsJoinFields", "declaredFields"}) public HashJoin( Pipe lhs, Fields lhsJoinFields, Pipe rhs, Fields rhsJoinFields, Fields declaredFields ) { super( null, Pipe.pipes( lhs, rhs ), Fields.fields( lhsJoinFields, rhsJoinFields ), declaredFields, null ); }
/** * Constructor HashJoin creates a new HashJoin instance. * * @param lhs * @param lhsJoinFields * @param rhs * @param rhsJoinFields * @param joiner */ @ConstructorProperties({"lhs", "lhsJoinFields", "rhs", "rhsJoinFields", "joiner"}) public HashJoin( Pipe lhs, Fields lhsJoinFields, Pipe rhs, Fields rhsJoinFields, Joiner joiner ) { super( null, Pipe.pipes( lhs, rhs ), Fields.fields( lhsJoinFields, rhsJoinFields ), null, null, joiner ); }
/** * Constructor HashJoin creates a new HashJoin instance. * * @param joinName * @param lhs * @param lhsJoinFields * @param rhs * @param rhsJoinFields * @param declaredFields */ @ConstructorProperties({"joinName", "lhs", "lhsJoinFields", "rhs", "rhsJoinFields", "declaredFields"}) public HashJoin( String joinName, Pipe lhs, Fields lhsJoinFields, Pipe rhs, Fields rhsJoinFields, Fields declaredFields ) { super( joinName, Pipe.pipes( lhs, rhs ), Fields.fields( lhsJoinFields, rhsJoinFields ), declaredFields, null ); }
/** * Constructor Splice creates a new Splice instance. * * @param lhs of type Pipe * @param lhsGroupFields of type Fields * @param rhs of type Pipe * @param rhsGroupFields of type Fields * @param declaredFields of type Fields * @param joiner of type CoGrouper */ protected Splice( Pipe lhs, Fields lhsGroupFields, Pipe rhs, Fields rhsGroupFields, Fields declaredFields, Joiner joiner ) { this( Pipe.pipes( lhs, rhs ), Fields.fields( lhsGroupFields, rhsGroupFields ), declaredFields, joiner ); }
/** * Method tapsMap creates a new Map using the given Pipe name and tap. * * @param pipe of type Pipe * @param tap of type Tap * @return Map */ public static Map<String, Tap> tapsMap( Pipe pipe, Tap tap ) { return tapsMap( Pipe.pipes( pipe ), Tap.taps( tap ) ); }
private Flow thirdFlow( Tap lhs, Tap rhs ) { Pipe lhsPipe = new Pipe( "lhs" ); Pipe rhsPipe = new Pipe( "rhs" ); Pipe pipe = new CoGroup( lhsPipe, new Fields( 0 ), rhsPipe, new Fields( 0 ), Fields.size( 2 ) ); Tap sink = getPlatform().getTextFile( getOutputPath( "third" ), SinkMode.REPLACE ); return getPlatform().getFlowConnector().connect( Cascades.tapsMap( Pipe.pipes( lhsPipe, rhsPipe ), Tap.taps( lhs, rhs ) ), sink, pipe ); }
private Flow thirdFlow( Tap lhs, Tap rhs ) { Pipe lhsPipe = new Pipe( "lhs" ); Pipe rhsPipe = new Pipe( "rhs" ); Pipe pipe = new CoGroup( lhsPipe, new Fields( 0 ), rhsPipe, new Fields( 0 ), Fields.size( 2 ) ); Tap sink = getPlatform().getTextFile( getOutputPath( "third" ), SinkMode.REPLACE ); return getPlatform().getFlowConnector().connect( Cascades.tapsMap( Pipe.pipes( lhsPipe, rhsPipe ), Tap.taps( lhs, rhs ) ), sink, pipe ); }