|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.EvalFunc<Integer>
org.apache.pig.builtin.IntMax
public class IntMax
This method should never be used directly, use MAX
.
Nested Class Summary | |
---|---|
static class |
IntMax.Final
|
static class |
IntMax.Initial
|
static class |
IntMax.Intermediate
|
Field Summary |
---|
Fields inherited from class org.apache.pig.EvalFunc |
---|
log, pigLogger, reporter, returnType |
Constructor Summary | |
---|---|
IntMax()
|
Method Summary | |
---|---|
void |
accumulate(Tuple b)
Pass tuples to the UDF. |
void |
cleanup()
Called after getValue() to prepare processing for next key. |
Integer |
exec(Tuple input)
This callback method must be implemented by all subclasses. |
String |
getFinal()
Get the final function. |
String |
getInitial()
Get the initial function. |
String |
getIntermed()
Get the intermediate function. |
Integer |
getValue()
Called when all tuples from current key have been passed to accumulate. |
protected static Integer |
max(Tuple input)
|
Schema |
outputSchema(Schema input)
Report the schema of the output of this UDF. |
Methods inherited from class org.apache.pig.EvalFunc |
---|
finish, getArgToFuncMapping, getCacheFiles, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, isAsynchronous, progress, setPigLogger, setReporter, warn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntMax()
Method Detail |
---|
public Integer exec(Tuple input) throws IOException
EvalFunc
exec
in class EvalFunc<Integer>
input
- the Tuple to be processed.
IOException
public String getInitial()
Algebraic
getInitial
in interface Algebraic
public String getIntermed()
Algebraic
getIntermed
in interface Algebraic
public String getFinal()
Algebraic
getFinal
in interface Algebraic
protected static Integer max(Tuple input) throws ExecException
ExecException
public Schema outputSchema(Schema input)
EvalFunc
outputSchema
in class EvalFunc<Integer>
input
- Schema of the input
public void accumulate(Tuple b) throws IOException
Accumulator
accumulate
in interface Accumulator<Integer>
b
- A tuple containing a single field, which is a bag. The bag will contain the set
of tuples being passed to the UDF in this iteration.
IOException
public void cleanup()
Accumulator
cleanup
in interface Accumulator<Integer>
public Integer getValue()
Accumulator
getValue
in interface Accumulator<Integer>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |