Interface Processor<T>
- Type Parameters:
T
- the type of the input that is processed
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AggregateByKeyProcessor
,AggregateProcessor
,BranchProcessor
,CoGroupByKeyProcessor
,FilterProcessor
,FlatMapProcessor
,FlatMapValuesProcessor
,ForEachProcessor
,JoinProcessor
,MapProcessor
,MapValuesProcessor
,MergeAggregateByKeyProcessor
,MergeAggregateProcessor
,PeekProcessor
,ReduceByKeyProcessor
,ReduceProcessor
,StateQueryProcessor
,UpdateStateByKeyProcessor
A processor processes a stream of elements and produces some result.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Executes some operations on the input and possibly emits some results.void
init
(ProcessorContext context) Initializes the processor.void
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.
-
Method Details
-
init
Initializes the processor. This is typically invoked from the underlying storm bolt's prepare method.- Parameters:
context
- the processor context
-
execute
Executes some operations on the input and possibly emits some results.- Parameters:
input
- the input to be processedstreamId
- the source stream id from where the input is received
-
punctuate
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.- Parameters:
stream
- the stream id on which the punctuation arrived
-