Class AbstractInput<IN,​OUT>

  • All Implemented Interfaces:
    org.apache.flink.streaming.api.operators.Input<IN>, org.apache.flink.streaming.api.operators.KeyContextHandler, org.apache.flink.streaming.runtime.operators.asyncprocessing.AsyncStateProcessing

    @Experimental
    public abstract class AbstractInput<IN,​OUT>
    extends Object
    implements org.apache.flink.streaming.api.operators.Input<IN>, org.apache.flink.streaming.api.operators.KeyContextHandler, org.apache.flink.streaming.runtime.operators.asyncprocessing.AsyncStateProcessing
    Base abstract implementation of Input interface intended to be used when extending AbstractStreamOperatorV2.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int inputId  
      protected org.apache.flink.streaming.api.operators.Output<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<OUT>> output  
      protected org.apache.flink.streaming.api.operators.AbstractStreamOperatorV2<OUT> owner  
      protected org.apache.flink.api.java.functions.KeySelector<?,​?> stateKeySelector
      KeySelector for extracting a key from an element being processed.
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractInput​(org.apache.flink.streaming.api.operators.AbstractStreamOperatorV2<OUT> owner, int inputId)  
    • Field Detail

      • stateKeySelector

        @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.

      • owner

        protected final org.apache.flink.streaming.api.operators.AbstractStreamOperatorV2<OUT> owner
      • inputId

        protected final int inputId
      • output

        protected final org.apache.flink.streaming.api.operators.Output<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<OUT>> output
    • Constructor Detail

      • AbstractInput

        public AbstractInput​(org.apache.flink.streaming.api.operators.AbstractStreamOperatorV2<OUT> owner,
                             int inputId)
    • Method Detail

      • processWatermark

        public void processWatermark​(org.apache.flink.streaming.api.watermark.Watermark mark)
                              throws Exception
        Specified by:
        processWatermark in interface org.apache.flink.streaming.api.operators.Input<IN>
        Throws:
        Exception
      • processLatencyMarker

        public void processLatencyMarker​(org.apache.flink.streaming.runtime.streamrecord.LatencyMarker latencyMarker)
                                  throws Exception
        Specified by:
        processLatencyMarker in interface org.apache.flink.streaming.api.operators.Input<IN>
        Throws:
        Exception
      • processWatermarkStatus

        public void processWatermarkStatus​(org.apache.flink.streaming.runtime.watermarkstatus.WatermarkStatus watermarkStatus)
                                    throws Exception
        Specified by:
        processWatermarkStatus in interface org.apache.flink.streaming.api.operators.Input<IN>
        Throws:
        Exception
      • setKeyContextElement

        public void setKeyContextElement​(org.apache.flink.streaming.runtime.streamrecord.StreamRecord record)
                                  throws Exception
        Specified by:
        setKeyContextElement in interface org.apache.flink.streaming.api.operators.Input<IN>
        Throws:
        Exception
      • processRecordAttributes

        public void processRecordAttributes​(org.apache.flink.streaming.runtime.streamrecord.RecordAttributes recordAttributes)
                                     throws Exception
        Specified by:
        processRecordAttributes in interface org.apache.flink.streaming.api.operators.Input<IN>
        Throws:
        Exception
      • hasKeyContext

        public boolean hasKeyContext()
        Specified by:
        hasKeyContext in interface org.apache.flink.streaming.api.operators.KeyContextHandler
      • isAsyncStateProcessingEnabled

        @Internal
        public final boolean isAsyncStateProcessingEnabled()
        Specified by:
        isAsyncStateProcessingEnabled in interface org.apache.flink.streaming.runtime.operators.asyncprocessing.AsyncStateProcessing
      • getRecordProcessor

        @Internal
        public final org.apache.flink.util.function.ThrowingConsumer<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>,​Exception> getRecordProcessor​(int inputId)
        Specified by:
        getRecordProcessor in interface org.apache.flink.streaming.runtime.operators.asyncprocessing.AsyncStateProcessing