Interface RollingPolicy<IN,​BucketID>

    • Method Detail

      • shouldRollOnCheckpoint

        boolean shouldRollOnCheckpoint​(PartFileInfo<BucketID> partFileState)
                                throws IOException
        Determines if the in-progress part file for a bucket should roll on every checkpoint.
        Parameters:
        partFileState - the state of the currently open part file of the bucket.
        Returns:
        True if the part file should roll, {@link false} otherwise.
        Throws:
        IOException
      • shouldRollOnEvent

        boolean shouldRollOnEvent​(PartFileInfo<BucketID> partFileState,
                                  IN element)
                           throws IOException
        Determines if the in-progress part file for a bucket should roll based on its current state, e.g. its size.
        Parameters:
        element - the element being processed.
        partFileState - the state of the currently open part file of the bucket.
        Returns:
        True if the part file should roll, {@link false} otherwise.
        Throws:
        IOException
      • shouldRollOnProcessingTime

        boolean shouldRollOnProcessingTime​(PartFileInfo<BucketID> partFileState,
                                           long currentTime)
                                    throws IOException
        Determines if the in-progress part file for a bucket should roll based on a time condition.
        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