org.apache.storm.hdfs.common

## Class NullPartitioner

- java.lang.Object
- - org.apache.storm.hdfs.common.NullPartitioner

- All Implemented Interfaces:
    Serializable, Partitioner

      public class NullPartitioner
      extends Object
      implements Partitioner

  The NullPartitioner partitions every tuple to the empty string. In otherwords, no partition sub directories will be added to the path.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NullPartitioner()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getPartitionPath(Tuple tuple)` Return a relative path that the tuple should be written to.

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

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

- - ### Constructor Detail

    - #### NullPartitioner

          public NullPartitioner()

  - ### Method Detail

    - #### getPartitionPath

          public String getPartitionPath(Tuple tuple)

      Description copied from interface: `Partitioner`

      Return a relative path that the tuple should be written to. For example, if an HdfsBolt were configured to write to /common/output and a partitioner returned “/foo” then the bolt should open a file in “/common/output/foo”

      A best practice is to use Path.SEPARATOR instead of a literal “/”

      Specified by:
        `getPartitionPath` in interface `Partitioner`
      Parameters:
        `tuple` - The tuple for which the relative path is being calculated.

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