Class MonitoredUDFExecutor

  extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.util.MonitoredUDFExecutor
All Implemented Interfaces:

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.
Constructor Summary
MonitoredUDFExecutor(EvalFunc udf)
Method Summary
 Object monitorExec(Tuple input)
 void terminate()
          This method *MUST* be called in the finish by POUserFunc.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public MonitoredUDFExecutor(EvalFunc udf)
Method Detail


public void terminate()
This method *MUST* be called in the finish by POUserFunc. Though we do use an ExitingExecutorService just in case.


public Object monitorExec(Tuple input)
                   throws IOException

Copyright © ${year} The Apache Software Foundation