cascading.pipe
Class Every

java.lang.Object
  extended by cascading.pipe.Pipe
      extended by cascading.pipe.Operator
          extended by cascading.pipe.Every
All Implemented Interfaces:
FlowElement, Serializable

public class Every
extends Operator

The Every operator applies an Aggregator or Buffer to every grouping.

Any number of Every instances may follow other Every, GroupBy, CoGroup instance if they apply an Aggregator, not a Buffer. If a Buffer, only one Every may follow a GroupBy or CoGroup.

Every operators create aggregate values for every grouping they encounter. This aggregate value is added to the current grouping Tuple. Subsequent Every instances can continue to append values to the grouping Tuple. When an Each follows and Every, the Each applies its operation to the grouping Tuple (thus all child values in the grouping are discarded and only aggregate values are propagated).

See Also:
Serialized Form

Nested Class Summary
 class Every.EveryAggregatorHandler
           
 class Every.EveryAssertionHandler
           
 class Every.EveryBufferHandler
           
 class Every.EveryHandler
          Class EveryHandler is a helper class that wraps Every instances.
 
Field Summary
 
Fields inherited from class cascading.pipe.Operator
argumentSelector, operation, outputSelector, plannerLevel
 
Fields inherited from class cascading.pipe.Pipe
previous
 
Constructor Summary
Every(Pipe previous, Aggregator aggregator)
          Constructor Every creates a new Every instance.
Every(Pipe previous, Aggregator aggregator, Fields outputSelector)
          Constructor Every creates a new Every instance.
Every(Pipe previous, AssertionLevel assertionLevel, GroupAssertion assertion)
          Constructor Every creates a new Every instance.
Every(Pipe previous, Buffer buffer)
          Constructor Every creates a new Every instance.
Every(Pipe previous, Buffer buffer, Fields outputSelector)
          Constructor Every creates a new Every instance.
Every(Pipe previous, Fields argumentSelector, Aggregator aggregator)
          Constructor Every creates a new Every instance.
Every(Pipe previous, Fields argumentSelector, Aggregator aggregator, Fields outputSelector)
          Constructor Every creates a new Every instance.
Every(Pipe previous, Fields argumentSelector, AssertionLevel assertionLevel, GroupAssertion assertion)
          Constructor Every creates a new Every instance.
Every(Pipe previous, Fields argumentSelector, Buffer buffer)
          Constructor Every creates a new Every instance.
Every(Pipe previous, Fields argumentSelector, Buffer buffer, Fields outputSelector)
          Constructor Every creates a new Every instance.
 
Method Summary
 Every.EveryHandler getHandler(Scope outgoingScope)
          Method getHandler returns the Every.EveryHandler for this instnce.
 boolean isAggregator()
          Method isReducer returns true if this Every instance holds a Aggregator operation.
 boolean isBuffer()
          Method isBuffer returns true if this Every instance holds a Buffer operation.
 Scope outgoingScopeFor(Set<Scope> incomingScopes)
          Method outgoingScopeFor returns the Scope this FlowElement hands off to the next FlowElement.
 Fields resolveFields(Scope scope)
          Method resolveFields returns the actual field names represented by the given Scope.
 Fields resolveIncomingOperationFields(Scope incomingScope)
          Method resolveIncomingOperationFields resolves the incoming scopes to the actual incoming operation field names.
 
Methods inherited from class cascading.pipe.Operator
equals, getArgumentSelector, getAssertionLevel, getFieldDeclaration, getOperation, getOutputSelector, getPlannerLevel, hashCode, hasPlannerLevel, isAssertion, isEquivalentTo, makeResult, printInternal, resolveRemainderFields, toString, verifyOperation
 
Methods inherited from class cascading.pipe.Pipe
getHeads, getName, getPrevious, getTrace, names, pipes, print
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Every

@ConstructorProperties(value={"previous","aggregator"})
public Every(Pipe previous,
                                        Aggregator aggregator)
Constructor Every creates a new Every instance.

Parameters:
previous - previous Pipe to receive input Tuples from
aggregator - Aggregator to be applied to every input Tuple grouping

Every

@ConstructorProperties(value={"previous","argumentSelector","aggregator"})
public Every(Pipe previous,
                                        Fields argumentSelector,
                                        Aggregator aggregator)
Constructor Every creates a new Every instance.

Parameters:
previous - previous Pipe to receive input Tuples from
argumentSelector - field selector that selects Function arguments from the input Tuple
aggregator - Aggregator to be applied to every input Tuple grouping

Every

@ConstructorProperties(value={"previous","argumentSelector","aggregator","outputSelector"})
public Every(Pipe previous,
                                        Fields argumentSelector,
                                        Aggregator aggregator,
                                        Fields outputSelector)
Constructor Every creates a new Every instance.

Parameters:
previous - previous Pipe to receive input Tuples from
argumentSelector - field selector that selects Function arguments from the input Tuple
aggregator - Aggregator to be applied to every input Tuple grouping
outputSelector - field selector that selects the output Tuple from the grouping and Aggregator results Tuples

Every

@ConstructorProperties(value={"previous","aggregator","outputSelector"})
public Every(Pipe previous,
                                        Aggregator aggregator,
                                        Fields outputSelector)
Constructor Every creates a new Every instance.

Parameters:
previous - previous Pipe to receive input Tuples from
aggregator - Aggregator to be applied to every input Tuple grouping
outputSelector - field selector that selects the output Tuple from the grouping and Aggregator results Tuples

Every

@ConstructorProperties(value={"previous","buffer"})
public Every(Pipe previous,
                                        Buffer buffer)
Constructor Every creates a new Every instance.

Parameters:
previous - previous Pipe to receive input Tuples from
buffer - Buffer to be applied to every input Tuple grouping

Every

@ConstructorProperties(value={"previous","argumentSelector","buffer"})
public Every(Pipe previous,
                                        Fields argumentSelector,
                                        Buffer buffer)
Constructor Every creates a new Every instance.

Parameters:
previous - previous Pipe to receive input Tuples from
argumentSelector - field selector that selects Function arguments from the input Tuple
buffer - Buffer to be applied to every input Tuple grouping

Every

@ConstructorProperties(value={"previous","argumentSelector","buffer","outputSelector"})
public Every(Pipe previous,
                                        Fields argumentSelector,
                                        Buffer buffer,
                                        Fields outputSelector)
Constructor Every creates a new Every instance.

Parameters:
previous - previous Pipe to receive input Tuples from
argumentSelector - field selector that selects Function arguments from the input Tuple
buffer - Buffer to be applied to every input Tuple grouping
outputSelector - field selector that selects the output Tuple from the grouping and Buffer results Tuples

Every

@ConstructorProperties(value={"previous","buffer","outputSelector"})
public Every(Pipe previous,
                                        Buffer buffer,
                                        Fields outputSelector)
Constructor Every creates a new Every instance.

Parameters:
previous - previous Pipe to receive input Tuples from
buffer - Buffer to be applied to every input Tuple grouping
outputSelector - field selector that selects the output Tuple from the grouping and Buffer results Tuples

Every

@ConstructorProperties(value={"previous","assertionLevel","assertion"})
public Every(Pipe previous,
                                        AssertionLevel assertionLevel,
                                        GroupAssertion assertion)
Constructor Every creates a new Every instance.

Parameters:
previous - previous Pipe to receive input Tuples from
assertionLevel - of type AssertionLevel
assertion - GroupAssertion to be applied to every input Tuple grouping

Every

@ConstructorProperties(value={"previous","argumentSelector","assertionLevel","assertion"})
public Every(Pipe previous,
                                        Fields argumentSelector,
                                        AssertionLevel assertionLevel,
                                        GroupAssertion assertion)
Constructor Every creates a new Every instance.

Parameters:
previous - previous Pipe to receive input Tuples from
argumentSelector - field selector that selects Function arguments from the input Tuple
assertionLevel - AssertionLevel to associate with the Assertion
assertion - GroupAssertion to be applied to every input Tuple grouping
Method Detail

isBuffer

public boolean isBuffer()
Method isBuffer returns true if this Every instance holds a Buffer operation.

Returns:
boolean

isAggregator

public boolean isAggregator()
Method isReducer returns true if this Every instance holds a Aggregator operation.

Returns:
boolean

resolveIncomingOperationFields

public Fields resolveIncomingOperationFields(Scope incomingScope)
Description copied from interface: FlowElement
Method resolveIncomingOperationFields resolves the incoming scopes to the actual incoming operation field names.

Specified by:
resolveIncomingOperationFields in interface FlowElement
Overrides:
resolveIncomingOperationFields in class Pipe
Parameters:
incomingScope - of type Scope
Returns:
Fields
See Also:
FlowElement.resolveIncomingOperationFields(cascading.flow.Scope)

resolveFields

public Fields resolveFields(Scope scope)
Description copied from interface: FlowElement
Method resolveFields returns the actual field names represented by the given Scope. The scope may be incoming or outgoing in relation to this FlowElement instance.

Specified by:
resolveFields in interface FlowElement
Overrides:
resolveFields in class Pipe
Parameters:
scope - of type Scope
Returns:
Fields
See Also:
FlowElement.resolveFields(Scope)

outgoingScopeFor

public Scope outgoingScopeFor(Set<Scope> incomingScopes)
Description copied from interface: FlowElement
Method outgoingScopeFor returns the Scope this FlowElement hands off to the next FlowElement.

Specified by:
outgoingScopeFor in interface FlowElement
Specified by:
outgoingScopeFor in class Operator
Parameters:
incomingScopes - of type Set
Returns:
Scope
See Also:
Operator.outgoingScopeFor(java.util.Set)

getHandler

public Every.EveryHandler getHandler(Scope outgoingScope)
Method getHandler returns the Every.EveryHandler for this instnce.

Parameters:
outgoingScope - of type Scope
Returns:
EveryHandler


Copyright © 2007-2010 Concurrent, Inc. All Rights Reserved.