Class CheckpointRollingPolicy<IN,​BucketID>

    • Constructor Detail

      • CheckpointRollingPolicy

        public CheckpointRollingPolicy()
    • Method Detail

      • 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