org.apache.hadoop.mapred.lib.aggregate

## Class ValueAggregatorMapper<K1 extends org.apache.hadoop.io.WritableComparable,V1 extends org.apache.hadoop.io.Writable>

- java.lang.Object
- - org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorJobBase<K1,V1>
  - - org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorMapper<K1,V1>

- All Implemented Interfaces:
    Closeable, AutoCloseable, JobConfigurable, Mapper<K1,V1,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>, Reducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>

      @InterfaceAudience.Public
       @InterfaceStability.Stable
      public class ValueAggregatorMapper<K1 extends org.apache.hadoop.io.WritableComparable,V1 extends org.apache.hadoop.io.Writable>
      extends ValueAggregatorJobBase<K1,V1>

  This class implements the generic mapper of Aggregate.

- - ### Field Summary

    - ### Fields inherited from class org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorJobBase

      `aggregatorDescriptorList`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ValueAggregatorMapper()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `map(K1 key, V1 value, OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> output, Reporter reporter)` the map function.
    `void` | `reduce(org.apache.hadoop.io.Text arg0, Iterator<org.apache.hadoop.io.Text> arg1, OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> arg2, Reporter arg3)` Do nothing.

    - ### Methods inherited from class org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorJobBase

      `close, configure, logSpec`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ValueAggregatorMapper

          public ValueAggregatorMapper()

  - ### Method Detail

    - #### map

          public void map(K1 key,
                          V1 value,
                          OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> output,
                          Reporter reporter)
                   throws IOException

      the map function. It iterates through the value aggregator descriptor list to generate aggregation id/value pairs and emit them.
      Parameters:
        `key` - the input key.
        `value` - the input value.
        `output` - collects mapped keys and values.
        `reporter` - facility to report progress.
      Throws:
        `IOException`

    - #### reduce

          public void reduce(org.apache.hadoop.io.Text arg0,
                             Iterator<org.apache.hadoop.io.Text> arg1,
                             OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> arg2,
                             Reporter arg3)
                      throws IOException

      Do nothing. Should not be called.
      Parameters:
        `arg0` - the key.
        `arg1` - the list of values to reduce.
        `arg2` - to collect keys and combined values.
        `arg3` - facility to report progress.
      Throws:
        `IOException`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.