cascading.tap.partition

## Class DelimitedPartition

- java.lang.Object
- - cascading.tap.partition.DelimitedPartition

All Implemented Interfaces:
  Partition, java.io.Serializable

    public class DelimitedPartition
    extends java.lang.Object
    implements Partition

DelimitedPartition is an implementation of the `Partition` interface that allows for simple text delimited paths as partitions.

For example, given the delimiter `-` (dash), a partition path will have dashes.

Note the delimiter must not be naturally present in any of the values making up the partition.

See Also:
  Serialized Form

### Field Summary

Fields
`static java.lang.String` `PATH_DELIM`

### Constructor Summary

Constructors
Constructor and Description
`DelimitedPartition(Fields partitionFields)`
`DelimitedPartition(Fields partitionFields, java.lang.String delimiter)`

### Method Summary

Methods
`Fields` `getPartitionFields()` The `Fields` used to populate the partition.
`int` `getPathDepth()` Returns the directory search depth of the partition.
`protected java.util.regex.Pattern` `getPattern()`
`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.

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

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

### Field Detail

#### PATH_DELIM

    public static final java.lang.String PATH_DELIM

See Also:
  Constant Field Values

### Constructor Detail

#### DelimitedPartition

    public DelimitedPartition(Fields partitionFields,
                      java.lang.String delimiter)

#### DelimitedPartition

    public DelimitedPartition(Fields partitionFields)

### Method Detail

#### getPathDepth

    public int getPathDepth()

Description copied from interface: `Partition`
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.

Specified by:
  `getPathDepth` in interface `Partition`
Returns:
  an int

#### getPartitionFields

    public Fields getPartitionFields()

Description copied from interface: `Partition`
The `Fields` used to populate the partition.

Specified by:
  `getPartitionFields` in interface `Partition`
Returns:
  a Fields instance

#### getPattern

    protected java.util.regex.Pattern getPattern()

#### toTuple

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

Description copied from interface: `Partition`
Converts the given partition String to a `TupleEntry` using the given TupleEntry instance for re-use.

Specified by:
  `toTuple` in interface `Partition`
Parameters:
  `partition` - a String
  `tupleEntry` - a TupleEntry

#### toPartition

    public java.lang.String toPartition(TupleEntry tupleEntry)

Description copied from interface: `Partition`
Converts the given tupleEntry into a partition string.

Specified by:
  `toPartition` in interface `Partition`
Parameters:
  `tupleEntry` - a TupleEntry
Returns:
  a String