com.cloudera.cdk.data.partition
Class ListFieldPartitioner<S>
java.lang.Object
com.cloudera.cdk.data.FieldPartitioner<S,Integer>
com.cloudera.cdk.data.partition.ListFieldPartitioner<S>
- All Implemented Interfaces:
- com.google.common.base.Function<S,Integer>, Comparator<Integer>
@Beta
public class ListFieldPartitioner<S>
- extends FieldPartitioner<S,Integer>
ListFieldPartitioner
public ListFieldPartitioner(String name,
List<Set<S>> values,
Class<S> sourceType)
apply
public Integer 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,Integer>- Specified by:
apply in class FieldPartitioner<S,Integer>
valueFromString
@Deprecated
public Integer 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,Integer>
equals
public boolean equals(Object o)
- Specified by:
equals in interface com.google.common.base.Function<S,Integer>- Specified by:
equals in interface Comparator<Integer>- Overrides:
equals in class Object
compare
public int compare(Integer o1,
Integer 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.