Class TableMaintenance

java.lang.Object
org.apache.iceberg.flink.maintenance.api.TableMaintenance

public class TableMaintenance extends Object
Creates the table maintenance graph.
  • Method Details

    • forChangeStream

      @Deprecated @Internal public static TableMaintenance.Builder forChangeStream(org.apache.flink.streaming.api.datastream.DataStream<TableChange> changeStream, TableLoader tableLoader, @Nullable TriggerLockFactory lockFactory)
      Deprecated.
      since 1.12.0, will be removed in 2.0.0. Use forChangeStream(DataStream, TableLoader) instead.
      Use when the change stream is already provided, like in the IcebergSink.addPostCommitTopology(DataStream).
      Parameters:
      changeStream - the table changes
      tableLoader - used for accessing the table
      lockFactory - used for preventing concurrent task runs, if null, use coordination lock.
      Returns:
      builder for the maintenance stream
    • forChangeStream

      @Internal public static TableMaintenance.Builder forChangeStream(org.apache.flink.streaming.api.datastream.DataStream<TableChange> changeStream, TableLoader tableLoader)
      Use when the change stream is already provided, like in the IcebergSink.addPostCommitTopology(DataStream).
      Parameters:
      changeStream - the table changes
      tableLoader - used for accessing the table
      Returns:
      builder for the maintenance stream
    • forTable

      @Deprecated public static TableMaintenance.Builder forTable(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment env, TableLoader tableLoader, @Nullable TriggerLockFactory lockFactory)
      Deprecated.
      since 1.12.0, will be removed in 2.0.0. Use forTable(StreamExecutionEnvironment, TableLoader) instead.
      Use this for standalone maintenance job. It creates a monitor source that detect table changes and build the maintenance pipelines afterwards.
      Parameters:
      env - used to register the monitor source
      tableLoader - used for accessing the table
      lockFactory - used for preventing concurrent task runs. If null, use coordination lock.
      Returns:
      builder for the maintenance stream
    • forTable

      public static TableMaintenance.Builder forTable(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment env, TableLoader tableLoader)
      Use this for standalone maintenance job. It creates a monitor source that detect table changes and build the maintenance pipelines afterwards. But use coordination lock default.
      Parameters:
      env - used to register the monitor source
      tableLoader - used for accessing the table
      Returns:
      builder for the maintenance stream