@Experimental public abstract class AbstractInput<IN,OUT> extends Object implements Input<IN>, KeyContextHandler
Input interface intended to be used when extending AbstractStreamOperatorV2.| Modifier and Type | Field and Description |
|---|---|
protected int |
inputId |
protected Output<StreamRecord<OUT>> |
output |
protected AbstractStreamOperatorV2<OUT> |
owner |
protected org.apache.flink.api.java.functions.KeySelector<?,?> |
stateKeySelector
KeySelector for extracting a key from an element being processed. |
| Constructor and Description |
|---|
AbstractInput(AbstractStreamOperatorV2<OUT> owner,
int inputId) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasKeyContext()
Whether the
Input has "KeyContext". |
void |
processLatencyMarker(LatencyMarker latencyMarker)
Processes a
LatencyMarker that arrived on the first input of this two-input operator. |
void |
processRecordAttributes(RecordAttributes recordAttributes)
Processes a
RecordAttributes that arrived at this input. |
void |
processWatermark(Watermark mark)
Processes a
Watermark that arrived on the first input of this two-input operator. |
void |
processWatermarkStatus(WatermarkStatus watermarkStatus)
Processes a
WatermarkStatus that arrived on this input of the MultipleInputStreamOperator. |
void |
setKeyContextElement(StreamRecord record)
Set the correct key context before processing the
record. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessElementhasKeyContext1, hasKeyContext2@Nullable protected final org.apache.flink.api.java.functions.KeySelector<?,?> stateKeySelector
KeySelector for extracting a key from an element being processed. This is used to
scope keyed state to a key. This is null if the operator is not a keyed operator.
This is for elements from the first input.
protected final AbstractStreamOperatorV2<OUT> owner
protected final int inputId
protected final Output<StreamRecord<OUT>> output
public AbstractInput(AbstractStreamOperatorV2<OUT> owner, int inputId)
public void processWatermark(Watermark mark) throws Exception
InputWatermark that arrived on the first input of this two-input operator.
This method is guaranteed to not be called concurrently with other methods of the operator.processWatermark in interface Input<IN>ExceptionWatermarkpublic void processLatencyMarker(LatencyMarker latencyMarker) throws Exception
InputLatencyMarker that arrived on the first input of this two-input operator.
This method is guaranteed to not be called concurrently with other methods of the operator.processLatencyMarker in interface Input<IN>ExceptionLatencyMarkerpublic void processWatermarkStatus(WatermarkStatus watermarkStatus) throws Exception
InputWatermarkStatus that arrived on this input of the MultipleInputStreamOperator. This method is guaranteed to not be called concurrently with
other methods of the operator.processWatermarkStatus in interface Input<IN>ExceptionWatermarkStatuspublic void setKeyContextElement(StreamRecord record) throws Exception
Inputrecord. Used for example to extract
key from the record and pass that key to the state backends. This method is
guaranteed to not be called concurrently with other methods of the operator.setKeyContextElement in interface Input<IN>Exceptionpublic void processRecordAttributes(RecordAttributes recordAttributes) throws Exception
InputRecordAttributes that arrived at this input. This method is guaranteed to
not be called concurrently with other methods of the operator.processRecordAttributes in interface Input<IN>Exceptionpublic boolean hasKeyContext()
KeyContextHandlerInput has "KeyContext". If false, we can omit the call of Input.setKeyContextElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>) for each record.hasKeyContext in interface KeyContextHandlerInput has "KeyContext", false otherwise.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.