com.nhncorp.neptune.parallel.hadoop
Class KeyRangePartitioner

java.lang.Object
  extended by com.nhncorp.neptune.parallel.hadoop.KeyRangePartitioner
All Implemented Interfaces:
org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Partitioner<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable>

public class KeyRangePartitioner
extends java.lang.Object
implements org.apache.hadoop.mapred.Partitioner<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable>

TabletOutputFormat.OUTPUT_TABLE의 Tablet의 rowkey 범위를 이용하여 파티셔닝을 수행한다. Reduce의 갯수(numPartitions)은 TabletOutputFormat.OUTPUT_TABLE의 Tablet 갯수로 지정한다. JobConf에 반드시 TabletOutputFormat.OUTPUT_TABLE이 설정되어야 한다.

Author:
nhn

Field Summary
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
KeyRangePartitioner()
           
 
Method Summary
 void configure(org.apache.hadoop.mapred.JobConf jobConf)
           
 int getPartition(org.apache.hadoop.io.WritableComparable key, org.apache.hadoop.io.Writable value, int numPartitions)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

KeyRangePartitioner

public KeyRangePartitioner()
Method Detail

getPartition

public int getPartition(org.apache.hadoop.io.WritableComparable key,
                        org.apache.hadoop.io.Writable value,
                        int numPartitions)
Specified by:
getPartition in interface org.apache.hadoop.mapred.Partitioner<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable>

configure

public void configure(org.apache.hadoop.mapred.JobConf jobConf)
Specified by:
configure in interface org.apache.hadoop.mapred.JobConfigurable