Class MonthFieldPartitioner

  extended by<Long,Integer>
      extended by
          extended by
All Implemented Interfaces:<Long,Integer>, Comparator<Integer>

public class MonthFieldPartitioner
extends CalendarFieldPartitioner

Field Summary
Fields inherited from class
calendarField, UTC
Constructor Summary
MonthFieldPartitioner(String sourceName, String name)
Method Summary
 Integer apply(Long timestamp)
           Apply the partition function to the given value.
 String valueToString(Integer value)
Methods inherited from class
compare, equals, getCalendarField, hashCode, project, toString, valueFromString
Methods inherited from class
getCardinality, getName, getSourceName, getSourceType, getType
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail


public MonthFieldPartitioner(String sourceName,
                             String name)
Method Detail


public Integer apply(@Nonnull
                     Long timestamp)
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<Long,Integer>
apply in class CalendarFieldPartitioner


public String valueToString(Integer 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 FieldPartitioners may choose to provide a different representation.

valueToString in class FieldPartitioner<Long,Integer>

Copyright © 2013–2014. All rights reserved.