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:
  • Constructor Details

    • CheckpointRollingPolicy

      public CheckpointRollingPolicy()
  • Method Details

    • shouldRollOnCheckpoint

      public boolean shouldRollOnCheckpoint(PartFileInfo<BucketID> partFileState)
      Description copied from interface: RollingPolicy
      Determines if the in-progress part file for a bucket should roll on every checkpoint.
      Specified by:
      shouldRollOnCheckpoint in interface RollingPolicy<IN,BucketID>
      Parameters:
      partFileState - the state of the currently open part file of the bucket.
      Returns:
      True if the part file should roll, {@link false} otherwise.
    • shouldRollOnEvent

      public abstract boolean shouldRollOnEvent(PartFileInfo<BucketID> partFileState, IN element) throws IOException
      Description copied from interface: RollingPolicy
      Determines if the in-progress part file for a bucket should roll based on its current state, e.g. its size.
      Specified by:
      shouldRollOnEvent in interface RollingPolicy<IN,BucketID>
      Parameters:
      partFileState - the state of the currently open part file of the bucket.
      element - the element being processed.
      Returns:
      True if 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: RollingPolicy
      Determines if the in-progress part file for a bucket should roll based on a time condition.
      Specified by:
      shouldRollOnProcessingTime in interface RollingPolicy<IN,BucketID>
      Parameters:
      partFileState - the state of the currently open part file of the bucket.
      currentTime - the current processing time.
      Returns:
      True if the part file should roll, {@link false} otherwise.
      Throws:
      IOException