Class CheckpointRollingPolicy<IN,BucketID>
java.lang.Object
org.apache.flink.streaming.api.functions.sink.filesystem.rollingpolicies.CheckpointRollingPolicy<IN,BucketID>
- All Implemented Interfaces:
Serializable,RollingPolicy<IN,BucketID>
- Direct Known Subclasses:
OnCheckpointRollingPolicy
@PublicEvolving
public abstract class CheckpointRollingPolicy<IN,BucketID>
extends Object
implements RollingPolicy<IN,BucketID>
An abstract
RollingPolicy which rolls on every checkpoint.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCheckpointRollingPolicy.PolicyBuilder<IN,BucketID, T extends CheckpointRollingPolicy.PolicyBuilder<IN, BucketID, T>> The base abstract builder class forCheckpointRollingPolicy. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanshouldRollOnCheckpoint(PartFileInfo<BucketID> partFileState) Determines if the in-progress part file for a bucket should roll on every checkpoint.abstract booleanshouldRollOnEvent(PartFileInfo<BucketID> partFileState, IN element) Determines if the in-progress part file for a bucket should roll based on its current state, e.g. its size.abstract booleanshouldRollOnProcessingTime(PartFileInfo<BucketID> partFileState, long currentTime) Determines if the in-progress part file for a bucket should roll based on a time condition.
-
Constructor Details
-
CheckpointRollingPolicy
public CheckpointRollingPolicy()
-
-
Method Details
-
shouldRollOnCheckpoint
Description copied from interface:RollingPolicyDetermines if the in-progress part file for a bucket should roll on every checkpoint.- Specified by:
shouldRollOnCheckpointin interfaceRollingPolicy<IN,BucketID> - Parameters:
partFileState- the state of the currently open part file of the bucket.- Returns:
Trueif the part file should roll, {@link false} otherwise.
-
shouldRollOnEvent
public abstract boolean shouldRollOnEvent(PartFileInfo<BucketID> partFileState, IN element) throws IOException Description copied from interface:RollingPolicyDetermines if the in-progress part file for a bucket should roll based on its current state, e.g. its size.- Specified by:
shouldRollOnEventin interfaceRollingPolicy<IN,BucketID> - Parameters:
partFileState- the state of the currently open part file of the bucket.element- the element being processed.- Returns:
Trueif the part file should roll, {@link false} otherwise.- Throws:
IOException
-
shouldRollOnProcessingTime
public abstract boolean shouldRollOnProcessingTime(PartFileInfo<BucketID> partFileState, long currentTime) throws IOException Description copied from interface:RollingPolicyDetermines if the in-progress part file for a bucket should roll based on a time condition.- Specified by:
shouldRollOnProcessingTimein interfaceRollingPolicy<IN,BucketID> - Parameters:
partFileState- the state of the currently open part file of the bucket.currentTime- the current processing time.- Returns:
Trueif the part file should roll, {@link false} otherwise.- Throws:
IOException
-