|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@InterfaceAudience.Public @InterfaceStability.Unstable @Documented @Retention(value=RUNTIME) public @interface MonitoredUDF
Describes how the execution of a UDF should be monitored, and what to do if it times out.
NOTE: does not work with UDFs that implement the Accumulator interface
Setting a default value will cause it to be used instead of null when the UDF times out. The appropriate value among in, long, string, etc, is used. The default fields of these annotations are arrays for Java reasons I won't bore you with.
Set them as if they were primitives: @MonitoredUDF( intDefault=5 )
There is currently no way to provide a default ByteArray, Tuple, Map, or Bag. Null will always be used for those.
Currently this annotation is ignored when the Accumulator interface is used.
Optional Element Summary | |
---|---|
double[] |
doubleDefault
|
int |
duration
Number of time units after which the execution should be halted and default returned. |
Class<? extends MonitoredUDFExecutor.ErrorCallback> |
errorCallback
UDF author can implement a static extension of MonitoredUDFExecutor.ErrorCallback and provide its class to the annotation in order to perform custom error handling. |
float[] |
floatDefault
|
int[] |
intDefault
|
long[] |
longDefault
|
String[] |
stringDefault
|
TimeUnit |
timeUnit
Time Units in which to measure timeout value. |
public abstract TimeUnit timeUnit
public abstract int duration
public abstract int[] intDefault
public abstract long[] longDefault
public abstract double[] doubleDefault
public abstract float[] floatDefault
public abstract String[] stringDefault
public abstract Class<? extends MonitoredUDFExecutor.ErrorCallback> errorCallback
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |