public class MaxBy extends AggregateBy
GroupBy
and a
MaxValue
Aggregator
operation.
This SubAssembly also uses the MaxBy.MaxPartials
AggregateBy.Functor
to track the maximum value 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 MaxPartials functions how many unique key sums to accumulate
in the LRU cache, before emitting the least recently used entry. This accumulation happens map-side, and thus is
bounded by the size of your map task JVM and the typical size of each group key.
By default, either the value of AggregateByProps.AGGREGATE_BY_CAPACITY
System property
or AggregateByProps.AGGREGATE_BY_DEFAULT_CAPACITY
will be used.AggregateBy
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
MaxBy.MaxPartials |
AggregateBy.Cache, AggregateBy.CompositeFunction, AggregateBy.Functor
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_THRESHOLD
Deprecated.
|
USE_DEFAULT_THRESHOLD
configDef, nodeConfigDef, parent, stepConfigDef
Constructor and Description |
---|
MaxBy(Fields valueField,
Fields maxField)
Constructor MaxBy creates a new MaxBy instance.
|
MaxBy(Pipe[] pipes,
Fields groupingFields,
Fields valueField,
Fields maxField)
Constructor MaxBy creates a new MaxBy instance.
|
MaxBy(Pipe[] pipes,
Fields groupingFields,
Fields valueField,
Fields maxField,
int threshold)
Constructor MaxBy creates a new MaxBy instance.
|
MaxBy(Pipe pipe,
Fields groupingFields,
Fields valueField,
Fields maxField)
Constructor MaxBy creates a new MaxBy instance.
|
MaxBy(Pipe pipe,
Fields groupingFields,
Fields valueField,
Fields maxField,
int threshold)
Constructor MaxBy creates a new MaxBy instance.
|
MaxBy(String name,
Pipe[] pipes,
Fields groupingFields,
Fields valueField,
Fields maxField)
Constructor MaxBy creates a new MaxBy instance.
|
MaxBy(String name,
Pipe[] pipes,
Fields groupingFields,
Fields valueField,
Fields maxField,
int threshold)
Constructor MaxBy creates a new MaxBy instance.
|
MaxBy(String name,
Pipe pipe,
Fields groupingFields,
Fields valueField,
Fields maxField)
Constructor MaxBy creates a new MaxBy instance.
|
MaxBy(String name,
Pipe pipe,
Fields groupingFields,
Fields valueField,
Fields maxField,
int threshold)
Constructor MaxBy creates a new MaxBy instance.
|
getAggregators, getArgumentFields, getCapacity, getFieldDeclarations, getFunctors, getGroupBy, getGroupingFields, initialize, initialize, verify
getName, getPrevious, getTailNames, getTails, setPrevious, setTails, unwind
equals, getConfigDef, getHeads, getNodeConfigDef, getParent, getStepConfigDef, getTrace, hasConfigDef, hashCode, hasNodeConfigDef, hasStepConfigDef, id, isEquivalentTo, named, names, outgoingScopeFor, pipes, print, printInternal, resolveIncomingOperationArgumentFields, resolveIncomingOperationPassThroughFields, setParent, toString
@Deprecated public static final int DEFAULT_THRESHOLD
@ConstructorProperties(value={"valueField","maxField"}) public MaxBy(Fields valueField, Fields maxField)
AggregateBy
instance.valueField
- of type FieldsmaxField
- of type Fields@ConstructorProperties(value={"pipe","groupingFields","valueField","maxField"}) public MaxBy(Pipe pipe, Fields groupingFields, Fields valueField, Fields maxField)
pipe
- of type PipegroupingFields
- of type FieldsvalueField
- of type FieldsmaxField
- of type Fields@ConstructorProperties(value={"pipe","groupingFields","valueField","maxField","threshold"}) public MaxBy(Pipe pipe, Fields groupingFields, Fields valueField, Fields maxField, int threshold)
pipe
- of type PipegroupingFields
- of type FieldsvalueField
- of type FieldsmaxField
- of type Fieldsthreshold
- of type int@ConstructorProperties(value={"name","pipe","groupingFields","valueField","maxField"}) public MaxBy(String name, Pipe pipe, Fields groupingFields, Fields valueField, Fields maxField)
name
- of type Stringpipe
- of type PipegroupingFields
- of type FieldsvalueField
- of type FieldsmaxField
- of type Fields@ConstructorProperties(value={"name","pipe","groupingFields","valueField","maxField","threshold"}) public MaxBy(String name, Pipe pipe, Fields groupingFields, Fields valueField, Fields maxField, int threshold)
name
- of type Stringpipe
- of type PipegroupingFields
- of type FieldsvalueField
- of type FieldsmaxField
- of type Fieldsthreshold
- of type int@ConstructorProperties(value={"pipes","groupingFields","valueField","maxField"}) public MaxBy(Pipe[] pipes, Fields groupingFields, Fields valueField, Fields maxField)
pipes
- of type Pipe[]groupingFields
- of type FieldsvalueField
- of type FieldsmaxField
- of type Fields@ConstructorProperties(value={"pipes","groupingFields","valueField","maxField","threshold"}) public MaxBy(Pipe[] pipes, Fields groupingFields, Fields valueField, Fields maxField, int threshold)
pipes
- of type Pipe[]groupingFields
- of type FieldsvalueField
- of type FieldsmaxField
- of type Fieldsthreshold
- of type int@ConstructorProperties(value={"name","pipes","groupingFields","valueField","maxField"}) public MaxBy(String name, Pipe[] pipes, Fields groupingFields, Fields valueField, Fields maxField)
name
- of type Stringpipes
- of type Pipe[]groupingFields
- of type FieldsvalueField
- of type FieldsmaxField
- of type Fields@ConstructorProperties(value={"name","pipes","groupingFields","valueField","maxField","threshold"}) public MaxBy(String name, Pipe[] pipes, Fields groupingFields, Fields valueField, Fields maxField, int threshold)
name
- of type Stringpipes
- of type Pipe[]groupingFields
- of type FieldsvalueField
- of type FieldsmaxField
- of type Fieldsthreshold
- of type intCopyright © 2007-2015 Concurrent, Inc. All Rights Reserved.