Class AbstractInput<IN,OUT>

java.lang.Object
org.apache.flink.streaming.api.operators.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 final int
     
    protected final org.apache.flink.streaming.api.operators.Output<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<OUT>>
     
    protected final org.apache.flink.streaming.api.operators.AbstractStreamOperatorV2<OUT>
     
    protected final org.apache.flink.api.java.functions.KeySelector<?,?>
    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)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final org.apache.flink.util.function.ThrowingConsumer<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>,Exception>
    getRecordProcessor(int inputId)
     
    boolean
     
    final boolean
     
    void
    processLatencyMarker(org.apache.flink.streaming.runtime.streamrecord.LatencyMarker latencyMarker)
     
    void
    processRecordAttributes(org.apache.flink.streaming.runtime.streamrecord.RecordAttributes recordAttributes)
     
    void
    processWatermark(org.apache.flink.streaming.api.watermark.Watermark mark)
     
    void
    processWatermarkStatus(org.apache.flink.streaming.runtime.watermarkstatus.WatermarkStatus watermarkStatus)
     
    void
    setKeyContextElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord record)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.flink.streaming.api.operators.Input

    processElement, processWatermark

    Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContextHandler

    hasKeyContext1, hasKeyContext2
  • Field Details

    • 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 Details

    • AbstractInput

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

    • 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