com.cloudera.cdk.data.partition
Class IdentityFieldPartitioner<S extends Comparable>

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

@Beta
public class IdentityFieldPartitioner<S extends Comparable>
extends FieldPartitioner<S,S>


Constructor Summary
IdentityFieldPartitioner(String name, Class<S> type, int buckets)
           
 
Method Summary
 S apply(S value)
           Apply the partition function to the given value.
 int compare(S o1, S o2)
           
 boolean equals(Object o)
           
 int hashCode()
           
 String toString()
           
 S valueFromString(String stringValue)
          Deprecated. 
 
Methods inherited from class com.cloudera.cdk.data.FieldPartitioner
getCardinality, getName, getSourceName, getSourceType, getType, valueToString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IdentityFieldPartitioner

public IdentityFieldPartitioner(String name,
                                Class<S> type,
                                int buckets)
Method Detail

apply

public S apply(S 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<S extends Comparable,S extends Comparable>
Specified by:
apply in class FieldPartitioner<S extends Comparable,S extends Comparable>

valueFromString

@Deprecated
public S valueFromString(String stringValue)
Deprecated. 

Description copied from class: FieldPartitioner

Retrieve the value for the field from the string representation.

Specified by:
valueFromString in class FieldPartitioner<S extends Comparable,S extends Comparable>

equals

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

compare

public int compare(S o1,
                   S o2)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013–2014 Cloudera. All rights reserved.