com.cloudera.cdk.data.partition
Class RangeFieldPartitioner

java.lang.Object
  extended by com.cloudera.cdk.data.FieldPartitioner<String,String>
      extended by com.cloudera.cdk.data.partition.RangeFieldPartitioner
All Implemented Interfaces:
com.google.common.base.Function<String,String>

@Beta
public class RangeFieldPartitioner
extends FieldPartitioner<String,String>


Constructor Summary
RangeFieldPartitioner(String name, String... upperBounds)
           
 
Method Summary
 String apply(String value)
           Apply the partition function to the given value.
 boolean equals(Object o)
           
 List<String> getUpperBounds()
           
 int hashCode()
           
 String toString()
           
 String valueFromString(String stringValue)
           Retrieve the value for the field from the string representation.
 
Methods inherited from class com.cloudera.cdk.data.FieldPartitioner
getCardinality, getName, getSourceName, getType, valueToString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RangeFieldPartitioner

public RangeFieldPartitioner(String name,
                             String... upperBounds)
Method Detail

apply

public String apply(String value)
Description copied from class: FieldPartitioner

Apply the partition function to the given value.

The type of value must be compatible with the field partitioner implementation. Normally, this is validated at the time of initial configuration rather than at runtime.

Specified by:
apply in interface com.google.common.base.Function<String,String>
Specified by:
apply in class FieldPartitioner<String,String>

valueFromString

public String valueFromString(String stringValue)
Description copied from class: FieldPartitioner

Retrieve the value for the field from the string representation.

Specified by:
valueFromString in class FieldPartitioner<String,String>

getUpperBounds

public List<String> getUpperBounds()

equals

public boolean equals(Object o)
Specified by:
equals in interface com.google.common.base.Function<String,String>
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Cloudera. All rights reserved.