@InterfaceAudience.Public @InterfaceStability.Unstable @Documented @Inherited @Retention(value=RUNTIME) public @interface MonitoredUDF
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.
Modifier and Type | Optional Element and Description |
---|---|
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 String[] stringDefault
public abstract Class<? extends MonitoredUDFExecutor.ErrorCallback> errorCallback
Copyright © 2007-2017 The Apache Software Foundation