org.apache.pig.backend.hadoop.executionengine.physicalLayer.util
Class MonitoredUDFExecutor

java.lang.Object
  extended by 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.
 
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

MonitoredUDFExecutor

public MonitoredUDFExecutor(EvalFunc udf)
Method Detail

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 © ${year} The Apache Software Foundation