Class PartitionTimeCommitTrigger
- java.lang.Object
-
- org.apache.flink.connector.file.table.stream.PartitionTimeCommitTrigger
-
- All Implemented Interfaces:
PartitionCommitTrigger
@Internal public class PartitionTimeCommitTrigger extends Object implements PartitionCommitTrigger
Partition commit trigger by partition time and watermark. It'll commit the partition predicated to be committable byPartitionCommitPredicate
Compares watermark, and watermark is related to records and checkpoint, so we need store watermark information for checkpoint.
-
-
Constructor Summary
Constructors Constructor Description PartitionTimeCommitTrigger(boolean isRestored, OperatorStateStore stateStore, PartitionCommitPredicate partitionCommitPredicate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPartition(String partition)
Add a pending partition.List<String>
committablePartitions(long checkpointId)
Get committable partitions, and cleanup useless watermarks and partitions.List<String>
endInput()
End input, return committable partitions and clear.void
snapshotState(long checkpointId, long watermark)
Snapshot state.
-
-
-
Constructor Detail
-
PartitionTimeCommitTrigger
public PartitionTimeCommitTrigger(boolean isRestored, OperatorStateStore stateStore, PartitionCommitPredicate partitionCommitPredicate) throws Exception
- Throws:
Exception
-
-
Method Detail
-
addPartition
public void addPartition(String partition)
Description copied from interface:PartitionCommitTrigger
Add a pending partition.- Specified by:
addPartition
in interfacePartitionCommitTrigger
-
committablePartitions
public List<String> committablePartitions(long checkpointId)
Description copied from interface:PartitionCommitTrigger
Get committable partitions, and cleanup useless watermarks and partitions.- Specified by:
committablePartitions
in interfacePartitionCommitTrigger
-
snapshotState
public void snapshotState(long checkpointId, long watermark) throws Exception
Description copied from interface:PartitionCommitTrigger
Snapshot state.- Specified by:
snapshotState
in interfacePartitionCommitTrigger
- Throws:
Exception
-
endInput
public List<String> endInput()
Description copied from interface:PartitionCommitTrigger
End input, return committable partitions and clear.- Specified by:
endInput
in interfacePartitionCommitTrigger
-
-