@InterfaceStability.Unstable public interface Processor<T> extends Serializable
A processor processes a stream of elements and produces some result.
Modifier and Type | Method and Description |
---|---|
void |
execute(T input,
String streamId)
Executes some operations on the input and possibly emits some results.
|
void |
init(ProcessorContext context)
Initializes the processor.
|
void |
punctuate(String stream)
Punctuation marks end of a batch which can be used to compute and pass the results of one stage in the pipeline to the next.
|
void init(ProcessorContext context)
Initializes the processor. This is typically invoked from the underlying storm bolt’s prepare method.
context
- the processor contextvoid execute(T input, String streamId)
Executes some operations on the input and possibly emits some results.
input
- the input to be processedstreamId
- the source stream id from where the input is receivedvoid punctuate(String stream)
Punctuation marks end of a batch which can be used to compute and pass the results of one stage in the pipeline to the next. For e.g. emit the results of an aggregation.
stream
- the stream id on which the punctuation arrivedCopyright © 2022 The Apache Software Foundation. All rights reserved.