|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ebay.erl.mobius.core.function.base.Projectable
com.ebay.erl.mobius.core.function.base.GroupFunction
com.ebay.erl.mobius.core.function.base.AggregateFunction
com.ebay.erl.mobius.core.function.base.SingleInputAggregateFunction
com.ebay.erl.mobius.core.function.Max
public class Max
Calculates the maximum value of the given
inputColumn
in Max(Column)
in a group.
By default, TupleColumnComparator
is used to
compare two different values. For different ordering,
use SerializableComparator
in
#Max(Column, SerializableComparator)
.
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
Field Summary | |
---|---|
protected TupleColumnComparator |
_comparator
The default comparator. |
protected java.util.Comparator<java.lang.Object> |
_user_specified_comparator
user specified comparator. |
protected java.lang.String |
_user_specified_comparator_clazz
the full class name of user specified comparator, specified in Max(Column, Comparator) |
protected byte |
valueType
the type of the value of the input column |
Fields inherited from class com.ebay.erl.mobius.core.function.base.SingleInputAggregateFunction |
---|
inputColumnName |
Fields inherited from class com.ebay.erl.mobius.core.function.base.AggregateFunction |
---|
aggregateResult |
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 | |
---|---|
Max(Column inputColumn)
Create an instance of Max operation to
get the maximum value of the given
inputColumn within a group. |
|
Max(Column inputColumn,
java.util.Comparator<java.lang.Object> comparator)
Create an instance of Max operation to
get the maximum value of the given
inputColumn within a group. |
Method Summary | |
---|---|
void |
consume(Tuple tuple)
consume a value within a group, to be implemented by sub-class. |
boolean |
isCombinable()
Determine this function can be run in a combiner or not, default is false. |
Methods inherited from class com.ebay.erl.mobius.core.function.base.SingleInputAggregateFunction |
---|
getComputedResult |
Methods inherited from class com.ebay.erl.mobius.core.function.base.AggregateFunction |
---|
getResult, newBigTupleList, output, reset |
Methods inherited from class com.ebay.erl.mobius.core.function.base.GroupFunction |
---|
getNoMatchResult, getRowsToBeOutputted |
Methods inherited from class com.ebay.erl.mobius.core.function.base.Projectable |
---|
calledByCombiner, equals, getConf, getInputColumns, getOutputSchema, getParticipatedDataset, hashCode, init, requireDataFromMultiDatasets, setCalledByCombiner, setConf, setOutputSchema, setReporter, toString, useGroupKeyOnly |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected transient TupleColumnComparator _comparator
Use TupleColumnComparator so it is possible to compare values in different but exchangeable type, ex: comparing integer with double.
protected byte valueType
protected java.lang.String _user_specified_comparator_clazz
Max(Column, Comparator)
protected transient java.util.Comparator<java.lang.Object> _user_specified_comparator
Constructor Detail |
---|
public Max(Column inputColumn)
Max
operation to
get the maximum value of the given
inputColumn
within a group.
The comparing is natural ordering.
public Max(Column inputColumn, java.util.Comparator<java.lang.Object> comparator)
Max
operation to
get the maximum value of the given
inputColumn
within a group.
The comparing is done by user specified comparator
.
Method Detail |
---|
public void consume(Tuple tuple)
GroupFunction
consume
in class GroupFunction
public final boolean isCombinable()
Projectable
isCombinable
in class Projectable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |