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 abstractRollingPolicywhich rolls on every checkpoint.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCheckpointRollingPolicy.PolicyBuilder<IN,BucketID,T extends CheckpointRollingPolicy.PolicyBuilder<IN,BucketID,T>>The base abstract builder class forCheckpointRollingPolicy.
-
Constructor Summary
Constructors Constructor Description CheckpointRollingPolicy()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanshouldRollOnCheckpoint(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.
-
-
-
Method Detail
-
shouldRollOnCheckpoint
public boolean shouldRollOnCheckpoint(PartFileInfo<BucketID> partFileState)
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
-
-