|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.mapreduce.Partitioner<org.apache.hadoop.io.Text,org.apache.hadoop.io.Writable>
org.apache.blur.manager.BlurPartitioner
public class BlurPartitioner
The BlurPartitioner
class is a Hadoop Partitioner
implementation for Blur. Simple hashing class used to guide the rows to the
correct shards during MapReduce jobs as well as during normal runtime
operations.
Constructor Summary | |
---|---|
BlurPartitioner()
|
Method Summary | |
---|---|
int |
getPartition(org.apache.hadoop.io.Text key,
org.apache.hadoop.io.Writable value,
int numReduceTasks)
Gets the partition or reducer from the the rowId, based on the number of shards in the table. |
int |
getShard(String rowId,
int numberOfShardsInTable)
Gets the shard from the the rowId, based on the number of shards in the table. |
int |
getShard(org.apache.hadoop.io.Text rowId,
int numberOfShardsInTable)
Gets the shard from the the rowId, based on the number of shards in the table. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlurPartitioner()
Method Detail |
---|
public int getShard(String rowId, int numberOfShardsInTable)
rowId
- the rowIdnumberOfShardsInTable
- the number of shards in the table.
public int getShard(org.apache.hadoop.io.Text rowId, int numberOfShardsInTable)
rowId
- the rowIdnumberOfShardsInTable
- the number of shards in the table.
public int getPartition(org.apache.hadoop.io.Text key, org.apache.hadoop.io.Writable value, int numReduceTasks)
getPartition
in class org.apache.hadoop.mapreduce.Partitioner<org.apache.hadoop.io.Text,org.apache.hadoop.io.Writable>
rowId
- the rowIdnumberOfShardsInTable
- the number of shards in the table.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |