public static class WithFailures.ExceptionAsMapHandler<T> extends SimpleFunction<WithFailures.ExceptionElement<T>,KV<T,java.util.Map<java.lang.String,java.lang.String>>>
Map<String, String>
and returns a KV where the key is the input element that failed processing, and the
value is the map of exception attributes.
Extends SimpleFunction so that full type information is captured. Map and KV
coders are well supported by Beam, so coder inference can be successfully applied if the
consuming transform passes type information to the failure collection's TupleTag.
The keys populated in the map are "className", "message", and "stackTrace" of the exception.
| Constructor and Description |
|---|
ExceptionAsMapHandler() |
| Modifier and Type | Method and Description |
|---|---|
KV<T,java.util.Map<java.lang.String,java.lang.String>> |
apply(WithFailures.ExceptionElement<T> f)
Returns the result of invoking this function on the given input.
|
fromSerializableFunctionWithOutputTypefromProcessFunctionWithOutputType, getInputTypeDescriptor, getOutputTypeDescriptor, populateDisplayDatapublic KV<T,java.util.Map<java.lang.String,java.lang.String>> apply(WithFailures.ExceptionElement<T> f)
ProcessFunctionapply in interface ProcessFunction<WithFailures.ExceptionElement<T>,KV<T,java.util.Map<java.lang.String,java.lang.String>>>apply in interface SerializableFunction<WithFailures.ExceptionElement<T>,KV<T,java.util.Map<java.lang.String,java.lang.String>>>apply in class SimpleFunction<WithFailures.ExceptionElement<T>,KV<T,java.util.Map<java.lang.String,java.lang.String>>>