org.apache.pig.backend.hadoop.executionengine.physicalLayer.util
Class MonitoredUDFExecutor
java.lang.Object
org.apache.pig.backend.hadoop.executionengine.physicalLayer.util.MonitoredUDFExecutor
- All Implemented Interfaces:
- Serializable
public class MonitoredUDFExecutor
- extends Object
- implements Serializable
MonitoredUDF is used to watch execution of a UDF, and kill it if the UDF takes an
exceedingly long time. Null is returned if the UDF times out.
Optionally, UDFs can implement the provided interfaces to provide custom logic for
handling errors and default values.
- See Also:
- Serialized Form
Nested Class Summary |
static class |
MonitoredUDFExecutor.ErrorCallback
UDF authors can optionally extend this class and provide the class of their custom callbacks in the annotation
to perform their own handling of errors and timeouts. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MonitoredUDFExecutor
public MonitoredUDFExecutor(EvalFunc udf)
terminate
public void terminate()
- This method *MUST* be called in the finish by POUserFunc.
Though we do use an ExitingExecutorService just in case.
monitorExec
public Object monitorExec(Tuple input)
throws IOException
- Throws:
IOException
Copyright © 2007-2012 The Apache Software Foundation