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

      @Internal public static TableMaintenance.Builder forChangeStream(org.apache.flink.streaming.api.datastream.DataStream<TableChange> changeStream, TableLoader tableLoader, TriggerLockFactory lockFactory)
      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
      Returns:
      builder for the maintenance stream
    • forTable

      public static TableMaintenance.Builder forTable(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment env, TableLoader tableLoader, TriggerLockFactory lockFactory)
      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
      Returns:
      builder for the maintenance stream