public class EmittingProcessorContext extends Object implements ProcessorContext
A context that emits the results to downstream processors which are in another bolt.
| Constructor and Description |
|---|
EmittingProcessorContext(ProcessorNode processorNode,
OutputCollector collector,
String outputStreamId) |
| Modifier and Type | Method and Description |
|---|---|
<T> void |
forward(T input)
Forwards the input to all downstream processors.
|
<T> void |
forward(T input,
String stream)
Forwards the input to downstream processors at specified stream.
|
Set<String> |
getWindowedParentStreams()
Returns the windowed parent streams.
|
boolean |
isWindowed()
Returns true if the processing is in a windowed context and should wait for punctuation before emitting results.
|
void |
setAnchor(RefCountedTuple anchor) |
void |
setEventTimestamp(long timestamp) |
void |
setTimestampField(String fieldName) |
public EmittingProcessorContext(ProcessorNode processorNode, OutputCollector collector, String outputStreamId)
public <T> void forward(T input)
ProcessorContextForwards the input to all downstream processors.
forward in interface ProcessorContextinput - the inputpublic <T> void forward(T input,
String stream)
ProcessorContextForwards the input to downstream processors at specified stream.
forward in interface ProcessorContextinput - the inputstream - the stream to forwardpublic boolean isWindowed()
ProcessorContextReturns true if the processing is in a windowed context and should wait for punctuation before emitting results.
isWindowed in interface ProcessorContextpublic Set<String> getWindowedParentStreams()
ProcessorContextReturns the windowed parent streams. These are the streams where punctuations arrive.
getWindowedParentStreams in interface ProcessorContextpublic void setTimestampField(String fieldName)
public void setAnchor(RefCountedTuple anchor)
public void setEventTimestamp(long timestamp)
Copyright © 2021 The Apache Software Foundation. All rights reserved.