Class StringValueMax
java.lang.Object
org.apache.hadoop.mapreduce.lib.aggregate.StringValueMax
- All Implemented Interfaces:
ValueAggregator<String>
- Direct Known Subclasses:
StringValueMax
This class implements a value aggregator that maintain the biggest of
a sequence of strings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNextValue(Object val) add a value to the aggregatorgetVal()voidreset()reset the aggregator
-
Constructor Details
-
StringValueMax
public StringValueMax()the default constructor
-
-
Method Details
-
addNextValue
add a value to the aggregator- Specified by:
addNextValuein interfaceValueAggregator<String>- Parameters:
val- a string.
-
getVal
- Returns:
- the aggregated value
-
getReport
- Specified by:
getReportin interfaceValueAggregator<String>- Returns:
- the string representation of the aggregated value
-
reset
public void reset()reset the aggregator- Specified by:
resetin interfaceValueAggregator<String>
-
getCombinerOutput
- Specified by:
getCombinerOutputin interfaceValueAggregator<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.
-