|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcascading.tap.partition.DelimitedPartition
public class DelimitedPartition
DelimitedPartition is an implementation of the Partition
interface that allows for simple
text delimited paths as partitions.
-
(dash), a partition path will have dashes.
Note the delimiter must not be naturally present in any of the values making up the partition.
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 |
---|
public static final String PATH_DELIM
Constructor Detail |
---|
public DelimitedPartition(Fields partitionFields, String delimiter)
public DelimitedPartition(Fields partitionFields)
Method Detail |
---|
public int getPathDepth()
Partition
"2012/09/01"
would have a depth of 3.
getPathDepth
in interface Partition
public Fields getPartitionFields()
Partition
Fields
used to populate the partition.
getPartitionFields
in interface Partition
protected Pattern getPattern()
public void toTuple(String partition, TupleEntry tupleEntry)
Partition
TupleEntry
using the given TupleEntry instance for re-use.
toTuple
in interface Partition
partition
- a StringtupleEntry
- a TupleEntrypublic String toPartition(TupleEntry tupleEntry)
Partition
toPartition
in interface Partition
tupleEntry
- a TupleEntry
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |