Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.mapred.lib.aggregate
Interface ValueAggregatorDescriptor

All Known Implementing Classes:
  AggregateWordCount.WordCountPlugInClass, AggregateWordHistogram.AggregateWordHistogramPlugin, UserDefinedValueAggregatorDescriptor, ValueAggregatorBaseDescriptor

    public interface ValueAggregatorDescriptor

This interface defines the contract a value aggregator descriptor must support. Such a descriptor can be configured with a JobConf 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
`static Text` | `ONE`
`static String` | `TYPE_SEPARATOR`

Method Summary
`void` | `configure(JobConf job)` Configure the object
`ArrayList<Map.Entry<Text,Text>>` | `generateKeyValPairs(Object key, Object val)` Generate a list of aggregation-id/value pairs for the given key/value pair.

Field Detail

### TYPE_SEPARATOR

    static final String TYPE_SEPARATOR

See Also:
  Constant Field Values

### ONE

    static final Text ONE

Method Detail

### generateKeyValPairs

    ArrayList<Map.Entry<Text,Text>> generateKeyValPairs(Object key,
                                                        Object val)

  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 key
    `val` - 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

    void configure(JobConf job)

  Configure the object

  Parameters:
    `job` - a JobConf object that may contain the information that can be used to configure the object.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation