public class JrubyAccumulatorEvalFunc extends AccumulatorEvalFunc<java.lang.Object>
EvalFunc.SchemaType
log, pigLogger, reporter, returnType
Constructor and Description |
---|
JrubyAccumulatorEvalFunc(java.lang.String path,
java.lang.String methodName)
This constructor is used by JrubyScriptEngine to register a Ruby class as an Accumulator.
|
Modifier and Type | Method and Description |
---|---|
void |
accumulate(Tuple b)
This uses the "exec" method required of AccumulatorPigUdf Ruby classes.
|
void |
cleanup()
Called after getValue() to prepare processing for next key.
|
java.lang.Object |
getValue()
This method calls "get" on the AccumulatorPigUdf Ruby class that was specified.
|
Schema |
outputSchema(Schema input)
This provides the Schema of the output, and leverages the get_output_schema function on the class object
that is defined on the ruby side.
|
exec
allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn
public JrubyAccumulatorEvalFunc(java.lang.String path, java.lang.String methodName)
public void accumulate(Tuple b) throws java.io.IOException
accumulate
in interface Accumulator<java.lang.Object>
accumulate
in class AccumulatorEvalFunc<java.lang.Object>
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.java.io.IOException
public void cleanup()
Accumulator
cleanup
in interface Accumulator<java.lang.Object>
cleanup
in class AccumulatorEvalFunc<java.lang.Object>
public java.lang.Object getValue()
getValue
in interface Accumulator<java.lang.Object>
getValue
in class AccumulatorEvalFunc<java.lang.Object>
public Schema outputSchema(Schema input)
outputSchema
in class EvalFunc<java.lang.Object>
input
- Schema of the inputCopyright © 2007-2017 The Apache Software Foundation