V - value typeR - return typepublic interface ValueTransformer<V,R>
ValueTransformer interface to transform a value into a new value.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this processor and clean up any resources.
|
void |
init(ProcessorContext context)
Initialize this transformer with the given context.
|
R |
punctuate(long timestamp)
Perform any periodic operations and possibly return a new value, if this processor
schedule itself with the context
during initialization. |
R |
transform(V value)
Transform the record with the given key and value.
|
void init(ProcessorContext context)
If this transformer is to be called periodically by the framework, then this method should
schedule itself with the provided context.
context - the context; may not be nullR transform(V value)
value - the value for the recordR punctuate(long timestamp)
schedule itself with the context
during initialization.timestamp - the stream time when this method is being calledvoid close()