void init(ProcessorContext context)
ProcessorNode
ProcessorNode is a processing node in a processor topology that is identified by a name and have zero or more child processor nodes.
|
Note
|
SourceNode and SinkNode are specialized ProcessorNodes.
|
ProcessorNode is created exclusively when ProcessorNodeFactory is requested to build a processor node.
ProcessorNode can be initialized (in a given ProcessorContext) and closed.
ProcessorNode can be punctuated.
ProcessorNode has a human-friendly / textual representation that is particularly helpful for debugging.
Initializing ProcessorNode — init Method
init…FIXME
|
Note
|
|
Processing Single Record (As Key and Value Pair) — process Method
void process(final K key, final V value)
process requests the Processor to process the given key and value pair.
In the end, process requests the NodeMetrics for the nodeProcessTimeSensor to record the processing time.
|
Note
|
|
Creating ProcessorNode Instance
ProcessorNode takes the following to be created:
-
Processor (
Processor<K, V>ofKkeys andVvalues)
ProcessorNode initializes the internal properties.
Adding Child Processor Node — addChild Method
void addChild(ProcessorNode<?, ?> child)
addChild…FIXME
|
Note
|
addChild is used when InternalTopologyBuilder is requested to build a SinkNode and ProcessorNode (when requested to build a topology of processor nodes).
|
close Method
void close()
close…FIXME
|
Note
|
close is used exclusively when StreamTask is requested to closeTopology (when StreamTask is requested to suspend).
|
Describing Itself (Textual Representation) — toString Method
String toString() (1)
String toString(String indent)
-
Uses an empty
indent
|
Note
|
toString is part of Java’s java.lang.Object Contract to return a human-friendly / textual representation of an object.
|
toString…FIXME
Executing Punctuator (Scheduled Periodic Action) — punctuate Method
void punctuate(
long timestamp,
Punctuator punctuator)
punctuate requests the given Punctuator to punctuate with the given timestamp.
In the end, punctuate requests the NodeMetrics for the nodePunctuateTimeSensor to record the time for node punctuation.
|
Note
|
punctuate is used exclusively when StreamTask is requested to punctuate a processor.
|