Class StringValueMax

java.lang.Object
org.apache.hadoop.mapreduce.lib.aggregate.StringValueMax
All Implemented Interfaces:
ValueAggregator<String>
Direct Known Subclasses:
StringValueMax

@Public @Stable public class StringValueMax extends Object implements ValueAggregator<String>
This class implements a value aggregator that maintain the biggest of a sequence of strings.
  • Constructor Details

    • StringValueMax

      public StringValueMax()
      the default constructor
  • Method Details

    • addNextValue

      public void addNextValue(Object val)
      add a value to the aggregator
      Specified by:
      addNextValue in interface ValueAggregator<String>
      Parameters:
      val - a string.
    • getVal

      public String getVal()
      Returns:
      the aggregated value
    • getReport

      public String getReport()
      Specified by:
      getReport in interface ValueAggregator<String>
      Returns:
      the string representation of the aggregated value
    • reset

      public void reset()
      reset the aggregator
      Specified by:
      reset in interface ValueAggregator<String>
    • getCombinerOutput

      public ArrayList<String> getCombinerOutput()
      Specified by:
      getCombinerOutput in interface ValueAggregator<String>
      Returns:
      return an array of one element. The element is a string representation of the aggregated value. The return value is expected to be used by the a combiner.