Package org.apache.storm.hdfs.trident

## Class HdfsState.HdfsFileOptions

- java.lang.Object
- - org.apache.storm.hdfs.trident.HdfsState.Options
  - - org.apache.storm.hdfs.trident.HdfsState.HdfsFileOptions

- All Implemented Interfaces:
    `Serializable`
  Enclosing class:
    HdfsState

      public static class HdfsState.HdfsFileOptions
      extends HdfsState.Options

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected RecordFormat` | `format` |

    - ### Fields inherited from class org.apache.storm.hdfs.trident.HdfsState.Options

      `configKey, fileNameFormat, fs, fsUrl, hdfsConfig, rotation, rotationActions, rotationPolicy`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `HdfsFileOptions()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `HdfsState.HdfsFileOptions` | `addRotationAction​(RotationAction action)` | Deprecated.
    `void` | `doCommit​(Long txId)` |
    `void` | `execute​(List<TridentTuple> tuples)` |
    `long` | `getCurrentOffset()` |
    `HdfsState.HdfsFileOptions` | `withBufferSize​(int sizeInBytes)` | Set the size of the buffer used for hdfs file copy in case of recovery.
    `HdfsState.HdfsFileOptions` | `withConfigKey​(String configKey)` |
    `HdfsState.HdfsFileOptions` | `withFileNameFormat​(FileNameFormat fileNameFormat)` |
    `HdfsState.HdfsFileOptions` | `withFsUrl​(String fsUrl)` |
    `HdfsState.HdfsFileOptions` | `withRecordFormat​(RecordFormat format)` |
    `HdfsState.HdfsFileOptions` | `withRotationPolicy​(FileRotationPolicy rotationPolicy)` |

    - ### Methods inherited from class org.apache.storm.hdfs.trident.HdfsState.Options

      `rotateOutputFile, rotateOutputFile`

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

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

- - ### Field Detail

    - #### format

          protected RecordFormat format

  - ### Constructor Detail

    - #### HdfsFileOptions

          public HdfsFileOptions()

  - ### Method Detail

    - #### withFsUrl

          public HdfsState.HdfsFileOptions withFsUrl​(String fsUrl)

    - #### withConfigKey

          public HdfsState.HdfsFileOptions withConfigKey​(String configKey)

    - #### withFileNameFormat

          public HdfsState.HdfsFileOptions withFileNameFormat​(FileNameFormat fileNameFormat)

    - #### withRecordFormat

          public HdfsState.HdfsFileOptions withRecordFormat​(RecordFormat format)

    - #### withRotationPolicy

          public HdfsState.HdfsFileOptions withRotationPolicy​(FileRotationPolicy rotationPolicy)

    - #### withBufferSize

          public HdfsState.HdfsFileOptions withBufferSize​(int sizeInBytes)

      Set the size of the buffer used for hdfs file copy in case of recovery. The default value is 131072.

      Note: The lower limit for the parameter is 4096, below which the option is ignored.

      Parameters:
        `sizeInBytes` - the buffer size in bytes
      Returns:
        `HdfsState.HdfsFileOptions`

    - #### addRotationAction

          @Deprecated
          public HdfsState.HdfsFileOptions addRotationAction​(RotationAction action)

      Deprecated.

    - #### getCurrentOffset

          public long getCurrentOffset()

    - #### doCommit

          public void doCommit​(Long txId)
                        throws IOException

      Throws:
        `IOException`

    - #### execute

          public void execute​(List<TridentTuple> tuples)
                       throws IOException

      Throws:
        `IOException`