Class TableMaintenance
java.lang.Object
org.apache.iceberg.flink.maintenance.api.TableMaintenance
Creates the table maintenance graph.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionstatic TableMaintenance.BuilderforChangeStream(org.apache.flink.streaming.api.datastream.DataStream<TableChange> changeStream, TableLoader tableLoader, TriggerLockFactory lockFactory) Use when the change stream is already provided, like in theIcebergSink.addPostCommitTopology(DataStream).static TableMaintenance.BuilderforTable(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment env, TableLoader tableLoader, TriggerLockFactory lockFactory) Use this for standalone maintenance job.
-
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 theIcebergSink.addPostCommitTopology(DataStream).- Parameters:
changeStream- the table changestableLoader- used for accessing the tablelockFactory- 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 sourcetableLoader- used for accessing the tablelockFactory- used for preventing concurrent task runs- Returns:
- builder for the maintenance stream
-