|
||||||||||
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.ExtendFunction
public abstract class ExtendFunction
An extend function takes one row at a time in a group
as its input, and produces one row as the output. In other
words, the output of ExtendFunction
can be decided by
just one input row does not require other records in a group.
As a result, ExtendFunction
cannot to access all the
records in a group.
The output of an extended function can be one to many columns. For example, an extended function can be a general function that performs A+B where the value of both A and B columns is numeric and the output of the function is the result of A+B.
The columns provided in the constructor are the inputs to a extend function.
Implement the getResult(Tuple)
method to provide
the calculation logic.
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 |
---|
Fields inherited from class com.ebay.erl.mobius.core.function.base.Projectable |
---|
conf, hashCode, inputs, outputSchema, reporter, requireDataFromMultiDatasets |
Constructor Summary | |
---|---|
protected |
ExtendFunction()
should be invoked by Column only |
|
ExtendFunction(Column[] inputs)
|
Method Summary | |
---|---|
Tuple |
getNoMatchResult(java.lang.Object nullReplacement)
To be called by Mobius, on the case of no match in outer-join task. |
abstract Tuple |
getResult(Tuple inputRow)
Get the result of this function based on the inputRow ,
the schema of the returned Tuple shall be the same as
Projectable.getOutputSchema() . |
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 |
---|
public ExtendFunction(Column[] inputs)
protected ExtendFunction()
Column
only
Method Detail |
---|
public abstract Tuple getResult(Tuple inputRow)
inputRow
,
the schema of the returned Tuple
shall be the same as
Projectable.getOutputSchema()
.
public final Tuple getNoMatchResult(java.lang.Object nullReplacement)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |