public interface Initializable
initialize(FunctionContext) is called prior
to the function being called to produce or process
stream tuples. This will be when:
Initialization is used open resources that
cannot be part of the function's serialized state, such
as files or connections to external systems.
Custom metrics can also be created using
createCustomMetric().
A function that implements this interface may also
implement java.lang.AutoCloseable to close
any resources opened in initialize(FunctionContext).
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(FunctionContext functionContext)
Initialize this function.
|
void initialize(FunctionContext functionContext) throws java.lang.Exception
functionContext - Context the function is executing in.java.lang.Exception - Exception initializing function.