Class TableOperatorWrapper<OP extends org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.table.data.RowData>>

java.lang.Object
org.apache.flink.table.runtime.operators.multipleinput.TableOperatorWrapper<OP>
All Implemented Interfaces:
Serializable

public class TableOperatorWrapper<OP extends org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.table.data.RowData>> extends Object implements Serializable
This class handles the close, endInput and other related logic of a StreamOperator. It also automatically propagates the end-input operation to the next wrapper that the outputEdges points to, so we only need to call the head wrapper's endOperatorInput(int) method.
See Also:
  • Constructor Details

    • TableOperatorWrapper

      public TableOperatorWrapper(org.apache.flink.streaming.api.operators.StreamOperatorFactory<org.apache.flink.table.data.RowData> factory, String operatorName, List<org.apache.flink.api.common.typeinfo.TypeInformation<?>> allInputTypes, org.apache.flink.api.common.typeinfo.TypeInformation<?> outputType)
  • Method Details

    • createOperator

      public void createOperator(org.apache.flink.streaming.api.operators.StreamOperatorParameters<org.apache.flink.table.data.RowData> parameters)
    • endOperatorInput

      public void endOperatorInput(int inputId) throws Exception
      Throws:
      Exception
    • getStreamOperator

      public OP getStreamOperator()
    • getAllInputTypes

      public List<org.apache.flink.api.common.typeinfo.TypeInformation<?>> getAllInputTypes()
    • getOutputType

      public org.apache.flink.api.common.typeinfo.TypeInformation<?> getOutputType()
    • addInput

      public void addInput(TableOperatorWrapper<?> input, int inputId)
    • setManagedMemoryFraction

      public void setManagedMemoryFraction(double managedMemoryFraction)
    • getManagedMemoryFraction

      public double getManagedMemoryFraction()
    • getInputEdges

      public List<TableOperatorWrapper.Edge> getInputEdges()
    • getInputWrappers

      public List<TableOperatorWrapper<?>> getInputWrappers()
    • getOutputEdges

      public List<TableOperatorWrapper.Edge> getOutputEdges()
    • getOutputWrappers

      public List<TableOperatorWrapper<?>> getOutputWrappers()
    • isClosed

      public boolean isClosed()
      Checks if the wrapped operator has been closed.

      Note that this method must be called in the task thread.

    • close

      public void close() throws Exception
      Throws:
      Exception
    • getOperatorName

      public String getOperatorName()
    • getEndedInputCount

      @VisibleForTesting public int getEndedInputCount()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object