StringValueMax (Hadoop 1.2.1 API) (original) (raw)



org.apache.hadoop.mapred.lib.aggregate

Class StringValueMax

java.lang.Object extended by org.apache.hadoop.mapred.lib.aggregate.StringValueMax

All Implemented Interfaces:

ValueAggregator


public class StringValueMax

extends Object

implements ValueAggregator

This class implements a value aggregator that maintain the biggest of a sequence of strings.


Constructor Summary
StringValueMax() the default constructor
Method Summary
void addNextValue(Object val) add a value to the aggregator
ArrayList<String> getCombinerOutput()
String getReport()
String getVal()
void reset() reset the aggregator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

StringValueMax

public StringValueMax()

the default constructor

Method Detail

addNextValue

public void addNextValue(Object val)

add a value to the aggregator

Specified by:

[addNextValue](../../../../../../org/apache/hadoop/mapred/lib/aggregate/ValueAggregator.html#addNextValue%28java.lang.Object%29) in interface [ValueAggregator](../../../../../../org/apache/hadoop/mapred/lib/aggregate/ValueAggregator.html "interface in org.apache.hadoop.mapred.lib.aggregate")

Parameters:

val - a string.


getVal

public String getVal()

Returns:

the aggregated value


getReport

public String getReport()

Specified by:

[getReport](../../../../../../org/apache/hadoop/mapred/lib/aggregate/ValueAggregator.html#getReport%28%29) in interface [ValueAggregator](../../../../../../org/apache/hadoop/mapred/lib/aggregate/ValueAggregator.html "interface in org.apache.hadoop.mapred.lib.aggregate")

Returns:

the string representation of the aggregated value


reset

public void reset()

reset the aggregator

Specified by:

[reset](../../../../../../org/apache/hadoop/mapred/lib/aggregate/ValueAggregator.html#reset%28%29) in interface [ValueAggregator](../../../../../../org/apache/hadoop/mapred/lib/aggregate/ValueAggregator.html "interface in org.apache.hadoop.mapred.lib.aggregate")


getCombinerOutput

public ArrayList<String> getCombinerOutput()

Specified by:

[getCombinerOutput](../../../../../../org/apache/hadoop/mapred/lib/aggregate/ValueAggregator.html#getCombinerOutput%28%29) in interface [ValueAggregator](../../../../../../org/apache/hadoop/mapred/lib/aggregate/ValueAggregator.html "interface in org.apache.hadoop.mapred.lib.aggregate")

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.



Copyright © 2009 The Apache Software Foundation