Class TimedRotationPolicy

All Implemented Interfaces:
Serializable, FileRotationPolicy

public class TimedRotationPolicy extends Object implements FileRotationPolicy
See Also:
  • Constructor Details

    • TimedRotationPolicy

      public TimedRotationPolicy(float count, TimedRotationPolicy.TimeUnit units)
    • TimedRotationPolicy

      protected TimedRotationPolicy(long interval)
  • Method Details

    • mark

      public boolean mark(Tuple tuple, long offset)
      Called for every tuple the HdfsBolt executes.
      Specified by:
      mark in interface FileRotationPolicy
      tuple - The tuple executed.
      offset - current offset of file being written
      true if a file rotation should be performed
    • reset

      public void reset()
      Called after the HdfsBolt rotates a file.
      Specified by:
      reset in interface FileRotationPolicy
    • copy

      public FileRotationPolicy copy()
      Description copied from interface: FileRotationPolicy
      Must be able to copy the rotation policy.
      Specified by:
      copy in interface FileRotationPolicy
    • getInterval

      public long getInterval()