org.apache.hadoop.hbase.mapreduce
Class SimpleTotalOrderPartitioner<VALUE>
java.lang.Object
org.apache.hadoop.mapreduce.Partitioner<ImmutableBytesWritable,VALUE>
org.apache.hadoop.hbase.mapreduce.SimpleTotalOrderPartitioner<VALUE>
- Type Parameters:
VALUE
-
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable
@InterfaceAudience.Public
@InterfaceStability.Stable
public class SimpleTotalOrderPartitioner<VALUE>
- extends org.apache.hadoop.mapreduce.Partitioner<ImmutableBytesWritable,VALUE>
- implements org.apache.hadoop.conf.Configurable
A partitioner that takes start and end keys and uses bigdecimal to figure
which reduce a key belongs to. Pass the start and end
keys in the Configuration using hbase.simpletotalorder.start
and hbase.simpletotalorder.end
. The end key needs to be
exclusive; i.e. one larger than the biggest key in your key space.
You may be surprised at how this class partitions the space; it may not
align with preconceptions; e.g. a start key of zero and an end key of 100
divided in ten will not make regions whose range is 0-10, 10-20, and so on.
Make your own partitioner if you need the region spacing to come out a
particular way.
- See Also:
START
,
END
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
START
@Deprecated
public static final String START
- Deprecated.
- See Also:
- Constant Field Values
END
@Deprecated
public static final String END
- Deprecated.
- See Also:
- Constant Field Values
SimpleTotalOrderPartitioner
public SimpleTotalOrderPartitioner()
setStartKey
public static void setStartKey(org.apache.hadoop.conf.Configuration conf,
byte[] startKey)
setEndKey
public static void setEndKey(org.apache.hadoop.conf.Configuration conf,
byte[] endKey)
getPartition
public int getPartition(ImmutableBytesWritable key,
VALUE value,
int reduces)
- Specified by:
getPartition
in class org.apache.hadoop.mapreduce.Partitioner<ImmutableBytesWritable,VALUE>
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
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.