## cascading.tap.partition
Class DelimitedPartition

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

All Implemented Interfaces:
  Partition, Serializable

    public class DelimitedPartition

extends 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
`static String` `PATH_DELIM`

Constructor Summary
`DelimitedPartition(Fields partitionFields)`
`DelimitedPartition(Fields partitionFields, String delimiter)`

Method Summary
`Fields` `getPartitionFields()` The `Fields` used to populate the partition.
`int` `getPathDepth()` Returns the directory search depth of the partition.
`protected Pattern` `getPattern()`
`String` `toPartition(TupleEntry tupleEntry)` Converts the given tupleEntry into a partition string.
`void` `toTuple(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 String PATH_DELIM

See Also:
  Constant Field Values

Constructor Detail

### DelimitedPartition

    public DelimitedPartition(Fields partitionFields,
                              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 Pattern getPattern()

### toTuple

    public void toTuple(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 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

Copyright © 2007-2014 Concurrent, Inc. All Rights Reserved.