org.apache.storm.hdfs.trident.rotation

## Class NoRotationPolicy

- java.lang.Object
- - org.apache.storm.hdfs.trident.rotation.NoRotationPolicy

- All Implemented Interfaces:
    Serializable, FileRotationPolicy

      public class NoRotationPolicy
      extends Object
      implements FileRotationPolicy

  File rotation policy that will never rotate… Just one big file. Intended for testing purposes.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NoRotationPolicy()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `mark(long offset)` Check if a file rotation should be performed based on the offset at which file is being written.
    `boolean` | `mark(TridentTuple tuple, long offset)` Called for every tuple the HdfsBolt executes.
    `void` | `reset()` Called after the HdfsBolt rotates a file.
    `void` | `start()` Start the policy.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NoRotationPolicy

          public NoRotationPolicy()

  - ### Method Detail

    - #### mark

          public boolean mark(TridentTuple tuple,
                              long offset)

      Description copied from interface: `FileRotationPolicy`

      Called for every tuple the HdfsBolt executes.

      Specified by:
        `mark` in interface `FileRotationPolicy`
      Parameters:
        `tuple` - The tuple executed.
        `offset` - current offset of file being written
      Returns:
        true if a file rotation should be performed

    - #### mark

          public boolean mark(long offset)

      Description copied from interface: `FileRotationPolicy`

      Check if a file rotation should be performed based on the offset at which file is being written.

      Specified by:
        `mark` in interface `FileRotationPolicy`
      Parameters:
        `offset` - the current offset of file being written
      Returns:
        true if a file rotation should be performed.

    - #### reset

          public void reset()

      Description copied from interface: `FileRotationPolicy`

      Called after the HdfsBolt rotates a file.

      Specified by:
        `reset` in interface `FileRotationPolicy`

    - #### start

          public void start()

      Description copied from interface: `FileRotationPolicy`

      Start the policy. Useful in case of policies like timed rotation where the timer can be started.

      Specified by:
        `start` in interface `FileRotationPolicy`

Copyright © 2021 The Apache Software Foundation. All rights reserved.