Class StaticIcebergEnumerator

java.lang.Object
org.apache.iceberg.flink.source.enumerator.StaticIcebergEnumerator
All Implemented Interfaces:
AutoCloseable, org.apache.flink.api.common.state.CheckpointListener, org.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,IcebergEnumeratorState>, org.apache.flink.api.connector.source.SupportsHandleExecutionAttemptSourceEvent

@Internal public class StaticIcebergEnumerator extends Object
One-time split enumeration at the start-up for batch execution
  • Constructor Details

    • StaticIcebergEnumerator

      public StaticIcebergEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<IcebergSourceSplit> enumeratorContext, SplitAssigner assigner)
  • Method Details

    • start

      public void start()
      Specified by:
      start in interface org.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,IcebergEnumeratorState>
    • shouldWaitForMoreSplits

      protected boolean shouldWaitForMoreSplits()
      return true if enumerator should wait for splits like in the continuous enumerator case
    • snapshotState

      public IcebergEnumeratorState snapshotState(long checkpointId)
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface org.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,IcebergEnumeratorState>
      Throws:
      IOException
    • handleSplitRequest

      public void handleSplitRequest(int subtaskId, @Nullable String requesterHostname)
      Specified by:
      handleSplitRequest in interface org.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,IcebergEnumeratorState>
    • handleSourceEvent

      public void handleSourceEvent(int subtaskId, org.apache.flink.api.connector.source.SourceEvent sourceEvent)
      Specified by:
      handleSourceEvent in interface org.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,IcebergEnumeratorState>
    • handleSourceEvent

      public void handleSourceEvent(int subTaskId, int attemptNumber, org.apache.flink.api.connector.source.SourceEvent sourceEvent)
      Specified by:
      handleSourceEvent in interface org.apache.flink.api.connector.source.SupportsHandleExecutionAttemptSourceEvent
    • addSplitsBack

      public void addSplitsBack(List<IcebergSourceSplit> splits, int subtaskId)
      Specified by:
      addSplitsBack in interface org.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,IcebergEnumeratorState>
    • addReader

      public void addReader(int subtaskId)
      Specified by:
      addReader in interface org.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,IcebergEnumeratorState>