Interface ValueAggregatorDescriptor
- All Known Subinterfaces:
ValueAggregatorDescriptor
- All Known Implementing Classes:
UserDefinedValueAggregatorDescriptor,UserDefinedValueAggregatorDescriptor,ValueAggregatorBaseDescriptor,ValueAggregatorBaseDescriptor
@Public
@Stable
public interface ValueAggregatorDescriptor
This interface defines the contract a value aggregator descriptor must
support. Such a descriptor can be configured with a
Configuration
object. Its main function is to generate a list of aggregation-id/value
pairs. An aggregation id encodes an aggregation type which is used to
guide the way to aggregate the value in the reduce/combiner phrase of an
Aggregate based job.
The mapper in an Aggregate based map/reduce job may create one or more of
ValueAggregatorDescriptor objects at configuration time. For each input
key/value pair, the mapper will use those objects to create aggregation
id/value pairs.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(Configuration conf) Configure the objectgenerateKeyValPairs(Object key, Object val) Generate a list of aggregation-id/value pairs for the given key/value pair.
-
Field Details
-
TYPE_SEPARATOR
- See Also:
-
ONE
-
-
Method Details
-
generateKeyValPairs
Generate a list of aggregation-id/value pairs for the given key/value pair. This function is usually called by the mapper of an Aggregate based job.- Parameters:
key- input keyval- input value- Returns:
- a list of aggregation id/value pairs. An aggregation id encodes an aggregation type which is used to guide the way to aggregate the value in the reduce/combiner phrase of an Aggregate based job.
-
configure
Configure the object- Parameters:
conf- a Configuration object that may contain the information that can be used to configure the object.
-