This project has retired. For details please refer to its Attic page.
TotalOrderPartitioner (Apache Crunch 0.11.0 API)

org.apache.crunch.lib.sort
Class TotalOrderPartitioner<K,V>

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Partitioner<K,V>
      extended by org.apache.crunch.lib.sort.TotalOrderPartitioner<K,V>
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable

public class TotalOrderPartitioner<K,V>
extends org.apache.hadoop.mapreduce.Partitioner<K,V>
implements org.apache.hadoop.conf.Configurable

A partition-aware Partitioner instance that can work with either Avro or Writable-formatted keys.


Field Summary
static String DEFAULT_PATH
           
static String PARTITIONER_PATH
           
 
Constructor Summary
TotalOrderPartitioner()
           
 
Method Summary
 org.apache.hadoop.conf.Configuration getConf()
           
 int getPartition(K key, V value, int modulo)
           
static String getPartitionFile(org.apache.hadoop.conf.Configuration conf)
           
 void setConf(org.apache.hadoop.conf.Configuration conf)
           
static void setPartitionFile(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path p)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PATH

public static final String DEFAULT_PATH
See Also:
Constant Field Values

PARTITIONER_PATH

public static final String PARTITIONER_PATH
See Also:
Constant Field Values
Constructor Detail

TotalOrderPartitioner

public TotalOrderPartitioner()
Method Detail

getConf

public org.apache.hadoop.conf.Configuration getConf()
Specified by:
getConf in interface org.apache.hadoop.conf.Configurable

setConf

public void setConf(org.apache.hadoop.conf.Configuration conf)
Specified by:
setConf in interface org.apache.hadoop.conf.Configurable

getPartition

public int getPartition(K key,
                        V value,
                        int modulo)
Specified by:
getPartition in class org.apache.hadoop.mapreduce.Partitioner<K,V>

setPartitionFile

public static void setPartitionFile(org.apache.hadoop.conf.Configuration conf,
                                    org.apache.hadoop.fs.Path p)

getPartitionFile

public static String getPartitionFile(org.apache.hadoop.conf.Configuration conf)


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.