Class OnCheckpointRollingPolicy<IN,BucketID>
- java.lang.Object
-
- org.apache.flink.streaming.api.functions.sink.filesystem.rollingpolicies.CheckpointRollingPolicy<IN,BucketID>
-
- org.apache.flink.streaming.api.functions.sink.filesystem.rollingpolicies.OnCheckpointRollingPolicy<IN,BucketID>
-
- All Implemented Interfaces:
Serializable,RollingPolicy<IN,BucketID>
@PublicEvolving public final class OnCheckpointRollingPolicy<IN,BucketID> extends CheckpointRollingPolicy<IN,BucketID>
ARollingPolicywhich rolls (ONLY) on every checkpoint.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.streaming.api.functions.sink.filesystem.rollingpolicies.CheckpointRollingPolicy
CheckpointRollingPolicy.PolicyBuilder<IN,BucketID,T extends CheckpointRollingPolicy.PolicyBuilder<IN,BucketID,T>>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <IN,BucketID>
OnCheckpointRollingPolicy<IN,BucketID>build()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.booleanshouldRollOnProcessingTime(PartFileInfo<BucketID> partFileState, long currentTime)Determines if the in-progress part file for a bucket should roll based on a time condition.-
Methods inherited from class org.apache.flink.streaming.api.functions.sink.filesystem.rollingpolicies.CheckpointRollingPolicy
shouldRollOnCheckpoint
-
-
-
-
Method Detail
-
shouldRollOnEvent
public boolean shouldRollOnEvent(PartFileInfo<BucketID> partFileState, IN element)
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>- Specified by:
shouldRollOnEventin classCheckpointRollingPolicy<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.
-
shouldRollOnProcessingTime
public boolean shouldRollOnProcessingTime(PartFileInfo<BucketID> partFileState, long currentTime)
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>- Specified by:
shouldRollOnProcessingTimein classCheckpointRollingPolicy<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.
-
build
public static <IN,BucketID> OnCheckpointRollingPolicy<IN,BucketID> build()
-
-