org.kitesdk.data.partition
Class PartitionFunctions

java.lang.Object
  extended by org.kitesdk.data.partition.PartitionFunctions

@Beta
public class PartitionFunctions
extends Object

Convenience class so you can say, for example, hash("username", 2) in JEXL.


Constructor Summary
PartitionFunctions()
           
 
Method Summary
static FieldPartitioner<Long,String> dateFormat(String sourceName, String name, String format)
           
static FieldPartitioner<Long,Integer> day(String sourceName, String name)
           
static FieldPartitioner<Object,Integer> hash(String name, int buckets)
           
static FieldPartitioner<Object,Integer> hash(String sourceName, String name, int buckets)
           
static FieldPartitioner<Long,Integer> hour(String sourceName, String name)
           
static
<S> FieldPartitioner<S,S>
identity(String name, Class<S> type, int buckets)
           
static FieldPartitioner identity(String name, int buckets)
          Deprecated. Use identity(String, Class, int).
static FieldPartitioner<Long,Integer> minute(String sourceName, String name)
           
static FieldPartitioner<Long,Integer> month(String sourceName, String name)
           
static FieldPartitioner<Integer,Integer> range(String name, int... upperBounds)
           
static FieldPartitioner<String,String> range(String name, String... upperBounds)
           
static String toExpression(FieldPartitioner fieldPartitioner)
           
static FieldPartitioner<Long,Integer> year(String sourceName, String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartitionFunctions

public PartitionFunctions()
Method Detail

hash

public static FieldPartitioner<Object,Integer> hash(String name,
                                                    int buckets)

hash

public static FieldPartitioner<Object,Integer> hash(String sourceName,
                                                    String name,
                                                    int buckets)

identity

@Deprecated
public static FieldPartitioner identity(String name,
                                                   int buckets)
Deprecated. Use identity(String, Class, int).


identity

public static <S> FieldPartitioner<S,S> identity(String name,
                                                 Class<S> type,
                                                 int buckets)

range

@Beta
public static FieldPartitioner<Integer,Integer> range(String name,
                                                           int... upperBounds)

range

@Beta
public static FieldPartitioner<String,String> range(String name,
                                                         String... upperBounds)

year

@Beta
public static FieldPartitioner<Long,Integer> year(String sourceName,
                                                       String name)

month

@Beta
public static FieldPartitioner<Long,Integer> month(String sourceName,
                                                        String name)

day

@Beta
public static FieldPartitioner<Long,Integer> day(String sourceName,
                                                      String name)

hour

@Beta
public static FieldPartitioner<Long,Integer> hour(String sourceName,
                                                       String name)

minute

@Beta
public static FieldPartitioner<Long,Integer> minute(String sourceName,
                                                         String name)

dateFormat

@Beta
public static FieldPartitioner<Long,String> dateFormat(String sourceName,
                                                            String name,
                                                            String format)

toExpression

@Beta
public static String toExpression(FieldPartitioner fieldPartitioner)


Copyright © 2013–2014. All rights reserved.