|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cascading.pipe.Pipe cascading.pipe.SubAssembly cascading.pipe.assembly.AggregateBy cascading.pipe.assembly.AverageBy
public class AverageBy
Class AverageBy is used to average values associated with duplicate keys in a tuple stream.
Typically finding the average value in a tuple stream relies on aGroupBy
and a Average
Aggregator
operation.
This SubAssembly uses the AverageBy.AveragePartials
AggregateBy.Functor
and private AverageBy.AverageFinal
Aggregator to count and sum as many observed duplicates before the GroupBy operator to reduce IO over the network.
This strategy is similar to using combiners
, except no sorting or serialization is invoked and results
in a much simpler mechanism.
The threshold
value tells the underlying SumPartials functions how many values to cache for each
unique key before dropping values from the LRU cache.
AggregateBy
,
Serialized FormNested Class Summary | |
---|---|
static class |
AverageBy.AverageFinal
Class AverageFinal is used to finalize the average operation on the Reduce side of the process. |
static class |
AverageBy.AveragePartials
Class AveragePartials is a AggregateBy.Functor that is used to count and sum observed duplicates from the tuple stream. |
Nested classes/interfaces inherited from class cascading.pipe.assembly.AggregateBy |
---|
AggregateBy.CompositeFunction, AggregateBy.Functor |
Field Summary |
---|
Fields inherited from class cascading.pipe.Pipe |
---|
previous |
Constructor Summary | |
---|---|
AverageBy(Fields valueField,
Fields averageField)
Constructor AverageBy creates a new AverageBy instance. |
|
AverageBy(Pipe[] pipes,
Fields groupingFields,
Fields valueField,
Fields averageField)
Constructor AverageBy creates a new AverageBy instance. |
|
AverageBy(Pipe[] pipes,
Fields groupingFields,
Fields valueField,
Fields averageField,
int threshold)
Constructor AverageBy creates a new AverageBy instance. |
|
AverageBy(Pipe pipe,
Fields groupingFields,
Fields valueField,
Fields averageField)
Constructor AverageBy creates a new AverageBy instance. |
|
AverageBy(Pipe pipe,
Fields groupingFields,
Fields valueField,
Fields averageField,
int threshold)
Constructor AverageBy creates a new AverageBy instance. |
|
AverageBy(String name,
Pipe[] pipes,
Fields groupingFields,
Fields valueField,
Fields averageField)
Constructor AverageBy creates a new AverageBy instance. |
|
AverageBy(String name,
Pipe[] pipes,
Fields groupingFields,
Fields valueField,
Fields averageField,
int threshold)
Constructor AverageBy creates a new AverageBy instance. |
|
AverageBy(String name,
Pipe pipe,
Fields groupingFields,
Fields valueField,
Fields averageField)
Constructor AverageBy creates a new AverageBy instance. |
|
AverageBy(String name,
Pipe pipe,
Fields groupingFields,
Fields valueField,
Fields averageField,
int threshold)
Constructor AverageBy creates a new AverageBy instance. |
Method Summary |
---|
Methods inherited from class cascading.pipe.assembly.AggregateBy |
---|
getAggregators, getArgumentFields, getFunctors, initialize, initialize, verify |
Methods inherited from class cascading.pipe.SubAssembly |
---|
getName, getPrevious, getTailNames, getTails, setTails, unwind |
Methods inherited from class cascading.pipe.Pipe |
---|
equals, getHeads, getTrace, hashCode, isEquivalentTo, names, outgoingScopeFor, pipes, print, printInternal, resolveFields, resolveIncomingOperationFields, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
@ConstructorProperties(value={"valueField","averageField"}) public AverageBy(Fields valueField, Fields averageField)
AggregateBy
instance.
valueField
- of type FieldsaverageField
- of type Fields@ConstructorProperties(value={"pipe","groupingFields","valueField","averageField"}) public AverageBy(Pipe pipe, Fields groupingFields, Fields valueField, Fields averageField)
pipe
- of type PipegroupingFields
- of type FieldsvalueField
- of type FieldsaverageField
- of type Fields@ConstructorProperties(value={"pipe","groupingFields","valueField","averageField","threshold"}) public AverageBy(Pipe pipe, Fields groupingFields, Fields valueField, Fields averageField, int threshold)
pipe
- of type PipegroupingFields
- of type FieldsvalueField
- of type FieldsaverageField
- of type Fieldsthreshold
- of type int@ConstructorProperties(value={"name","pipe","groupingFields","valueField","averageField"}) public AverageBy(String name, Pipe pipe, Fields groupingFields, Fields valueField, Fields averageField)
name
- of type Stringpipe
- of type PipegroupingFields
- of type FieldsvalueField
- of type FieldsaverageField
- of type Fields@ConstructorProperties(value={"name","pipe","groupingFields","valueField","averageField","threshold"}) public AverageBy(String name, Pipe pipe, Fields groupingFields, Fields valueField, Fields averageField, int threshold)
name
- of type Stringpipe
- of type PipegroupingFields
- of type FieldsvalueField
- of type FieldsaverageField
- of type Fieldsthreshold
- of type int@ConstructorProperties(value={"name","pipes","groupingFields","valueField","averageField"}) public AverageBy(Pipe[] pipes, Fields groupingFields, Fields valueField, Fields averageField)
pipes
- of type Pipe[]groupingFields
- of type FieldsvalueField
- of type FieldsaverageField
- of type Fields@ConstructorProperties(value={"name","pipes","groupingFields","valueField","averageField","threshold"}) public AverageBy(Pipe[] pipes, Fields groupingFields, Fields valueField, Fields averageField, int threshold)
pipes
- of type Pipe[]groupingFields
- of type FieldsvalueField
- of type FieldsaverageField
- of type Fieldsthreshold
- of type int@ConstructorProperties(value={"name","pipes","groupingFields","valueField","averageField"}) public AverageBy(String name, Pipe[] pipes, Fields groupingFields, Fields valueField, Fields averageField)
name
- of type Stringpipes
- of type Pipe[]groupingFields
- of type FieldsvalueField
- of type FieldsaverageField
- of type Fields@ConstructorProperties(value={"name","pipes","groupingFields","valueField","averageField","threshold"}) public AverageBy(String name, Pipe[] pipes, Fields groupingFields, Fields valueField, Fields averageField, int threshold)
name
- of type Stringpipes
- of type Pipe[]groupingFields
- of type FieldsvalueField
- of type FieldsaverageField
- of type Fieldsthreshold
- of type int
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |