com.cloudera.cdk.data.partition
Class HourFieldPartitioner
java.lang.Object
com.cloudera.cdk.data.FieldPartitioner
com.cloudera.cdk.data.partition.HourFieldPartitioner
- All Implemented Interfaces:
- com.google.common.base.Function<Object,Object>
@Beta
public class HourFieldPartitioner
- extends FieldPartitioner
cal
protected Calendar cal
calendarField
protected int calendarField
HourFieldPartitioner
public HourFieldPartitioner(String sourceName,
String name)
valueToString
public String valueToString(Object value)
- Description copied from class:
FieldPartitioner
Retrieve the value for the field formatted as a String
. By default,
this is the object's Object.toString()
representation,
but some FieldPartitioner
s may choose to provide a different representation.
- Overrides:
valueToString
in class FieldPartitioner
apply
public Object apply(@Nonnull
Object 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<Object,Object>
- Specified by:
apply
in class FieldPartitioner
valueFromString
public Object valueFromString(String stringValue)
- Description copied from class:
FieldPartitioner
Retrieve the value for the field from the string representation.
- Specified by:
valueFromString
in class FieldPartitioner
equals
public boolean equals(Object o)
- Specified by:
equals
in interface com.google.common.base.Function<Object,Object>
- 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.