|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.EvalFunc<T>
org.apache.pig.AccumulatorEvalFunc<T>
org.apache.pig.AlgebraicEvalFunc<T>
org.apache.pig.scripting.jruby.JrubyAlgebraicEvalFunc<T>
public abstract class JrubyAlgebraicEvalFunc<T>
This class provides the bridge between Ruby classes that extend the AlgebraicPigUdf "interface" by implementing an initial, intermed, and final method. Unlike EvalFuncs and Accumulators, the type must be known at compile time (ie it can't return Object), as Pig inspects the type and ensures that it is valid. This is why class specific shells are provided at the bottom. This class leverages AlgebraicEvalFunc to provide the Accumulator and EvalFunc implementations.
Nested Class Summary | |
---|---|
static class |
JrubyAlgebraicEvalFunc.AlgebraicFunctionWrapper<T>
This is a lightweight wrapper shell that registers information on the method being called, and provides the initializer that the static Algebraic classes (Initial, Intermed, Final) will use to execute. |
static class |
JrubyAlgebraicEvalFunc.BagJrubyAlgebraicEvalFunc
Unlike EvalFuncs and Accumulators, the type must be known at compile time (ie it can't return Object), as Pig inspects the type and ensures that it is valid. |
static class |
JrubyAlgebraicEvalFunc.ChararrayJrubyAlgebraicEvalFunc
|
static class |
JrubyAlgebraicEvalFunc.DataByteArrayJrubyAlgebraicEvalFunc
|
static class |
JrubyAlgebraicEvalFunc.DoubleJrubyAlgebraicEvalFunc
|
static class |
JrubyAlgebraicEvalFunc.Final<T>
This class invokes the final method on the given Ruby class. |
static class |
JrubyAlgebraicEvalFunc.FloatJrubyAlgebraicEvalFunc
|
static class |
JrubyAlgebraicEvalFunc.Initial
This class invokes the initial method on the given Ruby class. |
static class |
JrubyAlgebraicEvalFunc.IntegerJrubyAlgebraicEvalFunc
|
static class |
JrubyAlgebraicEvalFunc.Intermed
This class invokes the intermed method on the given Ruby class. |
static class |
JrubyAlgebraicEvalFunc.LongJrubyAlgebraicEvalFunc
|
static class |
JrubyAlgebraicEvalFunc.MapJrubyAlgebraicEvalFunc
|
static class |
JrubyAlgebraicEvalFunc.TupleJrubyAlgebraicEvalFunc
|
Field Summary | |
---|---|
protected static BagFactory |
mBagFactory
|
protected static TupleFactory |
mTupleFactory
|
protected static org.jruby.Ruby |
ruby
|
protected static org.jruby.embed.ScriptingContainer |
rubyEngine
|
Fields inherited from class org.apache.pig.EvalFunc |
---|
log, pigLogger, reporter, returnType |
Constructor Summary | |
---|---|
JrubyAlgebraicEvalFunc(String fileName,
String functionName)
The constructor takes information on the script and method being invoked and registers it with the superclass (which is necessary for AlgebraicEvalFunc). |
Method Summary | |
---|---|
abstract String |
getFinal()
This must be implement as per a normal Algebraic interface. |
String |
getInitial()
This must be implement as per a normal Algebraic interface. |
String |
getIntermed()
This must be implement as per a normal Algebraic interface. |
Methods inherited from class org.apache.pig.AlgebraicEvalFunc |
---|
accumulate, cleanup, getValue |
Methods inherited from class org.apache.pig.AccumulatorEvalFunc |
---|
exec |
Methods inherited from class org.apache.pig.EvalFunc |
---|
finish, getArgToFuncMapping, getCacheFiles, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, isAsynchronous, outputSchema, progress, setPigLogger, setReporter, warn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static BagFactory mBagFactory
protected static final TupleFactory mTupleFactory
protected static final org.jruby.embed.ScriptingContainer rubyEngine
protected static final org.jruby.Ruby ruby
Constructor Detail |
---|
public JrubyAlgebraicEvalFunc(String fileName, String functionName)
Method Detail |
---|
public abstract String getFinal()
AlgebraicEvalFunc
Algebraic
for
more information.
getFinal
in interface Algebraic
getFinal
in class AlgebraicEvalFunc<T>
public String getInitial()
AlgebraicEvalFunc
Algebraic
for
more information.
getInitial
in interface Algebraic
getInitial
in class AlgebraicEvalFunc<T>
public String getIntermed()
AlgebraicEvalFunc
Algebraic
for
more information.
getIntermed
in interface Algebraic
getIntermed
in class AlgebraicEvalFunc<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |