cascading.tap.partition

## Interface Partition

- All Superinterfaces:
    java.io.Serializable
  All Known Implementing Classes:
    DelimitedPartition

      public interface Partition
      extends java.io.Serializable

  The Partition interface allows for custom partitioning mechanisms to be created with the `BasePartitionTap` sub-classes.

  A partition is a directory on a filesystem, where the directory contains data related to the files underneath the partition directory.

  For example, a partition could be `"2012/09/01"`, which would contain log files for that day.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Fields` | `getPartitionFields()` The `Fields` used to populate the partition.
    `int` | `getPathDepth()` Returns the directory search depth of the partition.
    `java.lang.String` | `toPartition(TupleEntry tupleEntry)` Converts the given tupleEntry into a partition string.
    `void` | `toTuple(java.lang.String partition, TupleEntry tupleEntry)` Converts the given partition String to a `TupleEntry` using the given TupleEntry instance for re-use.

- - ### Method Detail

    - #### getPathDepth

          int getPathDepth()

      Returns the directory search depth of the partition.

      For example, a Partition implementation that returns values like `"2012/09/01"` would have a depth of 3.
      Returns:
        an int

    - #### getPartitionFields

          Fields getPartitionFields()

      The `Fields` used to populate the partition.
      Returns:
        a Fields instance

    - #### toTuple

          void toTuple(java.lang.String partition,
                     TupleEntry tupleEntry)

      Converts the given partition String to a `TupleEntry` using the given TupleEntry instance for re-use.
      Parameters:
        `partition` - a String
        `tupleEntry` - a TupleEntry

    - #### toPartition

          java.lang.String toPartition(TupleEntry tupleEntry)

      Converts the given tupleEntry into a partition string.
      Parameters:
        `tupleEntry` - a TupleEntry
      Returns:
        a String

Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.