com.ebay.erl.mobius.core.function
Class UniqueCounts

java.lang.Object
  extended by com.ebay.erl.mobius.core.function.base.Projectable
      extended by com.ebay.erl.mobius.core.function.base.GroupFunction
          extended by com.ebay.erl.mobius.core.function.Unique
              extended by com.ebay.erl.mobius.core.function.UniqueCounts
All Implemented Interfaces:
java.io.Serializable, org.apache.hadoop.conf.Configurable

public class UniqueCounts
extends Unique

Computes the number of unique values for the given inputColumns in a group.

Uniqueness is measured within the values from the specified inputColumns in UniqueCounts(Column...) in a group.

This product is licensed under the Apache License, Version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0. This product contains portions derived from Apache hadoop which is licensed under the Apache License, Version 2.0, available at http://hadoop.apache.org. © 2007 – 2012 eBay Inc., Evan Chiu, Woody Zhou, Neel Sundaresan

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ebay.erl.mobius.core.function.Unique
temp
 
Fields inherited from class com.ebay.erl.mobius.core.function.base.GroupFunction
rowsToBeOutputted
 
Fields inherited from class com.ebay.erl.mobius.core.function.base.Projectable
conf, hashCode, inputs, outputSchema, reporter, requireDataFromMultiDatasets
 
Constructor Summary
UniqueCounts(Column... inputColumns)
          Create an instance of UniqueCounts to calculate number of unique rows within a group.
 
Method Summary
 BigTupleList getResult()
          Override the implementation from Unique, only output single row per group.
 
Methods inherited from class com.ebay.erl.mobius.core.function.Unique
consume, reset
 
Methods inherited from class com.ebay.erl.mobius.core.function.base.GroupFunction
getNoMatchResult, getRowsToBeOutputted, output
 
Methods inherited from class com.ebay.erl.mobius.core.function.base.Projectable
calledByCombiner, equals, getConf, getInputColumns, getOutputSchema, getParticipatedDataset, hashCode, init, isCombinable, requireDataFromMultiDatasets, setCalledByCombiner, setConf, setOutputSchema, setReporter, toString, useGroupKeyOnly
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UniqueCounts

public UniqueCounts(Column... inputColumns)
Create an instance of UniqueCounts to calculate number of unique rows within a group.

Uniqueness is measured only within the values from inputColumns.

Method Detail

getResult

public BigTupleList getResult()
Override the implementation from Unique, only output single row per group. The row contains only one column which represents the number of unique rows in a group.

Overrides:
getResult in class Unique