|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapreduce.lib.aggregate.UniqValueCount
@InterfaceAudience.Public @InterfaceStability.Stable public class UniqValueCount
This class implements a value aggregator that dedupes a sequence of objects.
Field Summary | |
---|---|
static String |
MAX_NUM_UNIQUE_VALUES
|
Constructor Summary | |
---|---|
UniqValueCount()
the default constructor |
|
UniqValueCount(long maxNum)
constructor |
Method Summary | |
---|---|
void |
addNextValue(Object val)
add a value to the aggregator |
ArrayList<Object> |
getCombinerOutput()
|
String |
getReport()
|
Set<Object> |
getUniqueItems()
|
void |
reset()
reset the aggregator |
long |
setMaxItems(long n)
Set the limit on the number of unique values |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MAX_NUM_UNIQUE_VALUES
Constructor Detail |
---|
public UniqValueCount()
public UniqValueCount(long maxNum)
maxNum
- the limit in the number of unique values to keep.Method Detail |
---|
public long setMaxItems(long n)
n
- the desired limit on the number of unique values
public void addNextValue(Object val)
addNextValue
in interface ValueAggregator<Object>
val
- an object.public String getReport()
getReport
in interface ValueAggregator<Object>
public Set<Object> getUniqueItems()
public void reset()
reset
in interface ValueAggregator<Object>
public ArrayList<Object> getCombinerOutput()
getCombinerOutput
in interface ValueAggregator<Object>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |