|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.util.RegionSplitter.UniformSplit
public static class RegionSplitter.UniformSplit
A SplitAlgorithm that divides the space of possible keys evenly. Useful when the keys are approximately uniform random bytes (e.g. hashes). Rows are raw byte values in the range 00 => FF and are right-padded with zeros to keep the same memcmp() order. This is the natural algorithm to use for a byte[] environment and saves space, but is not necessarily the easiest for readability.
| Constructor Summary | |
|---|---|
RegionSplitter.UniformSplit()
|
|
| Method Summary | |
|---|---|
byte[] |
firstRow()
In HBase, the first row is represented by an empty byte array. |
byte[] |
lastRow()
In HBase, the last row is represented by an empty byte array. |
String |
rowToStr(byte[] row)
|
String |
separator()
|
void |
setFirstRow(byte[] userInput)
Set the first row |
void |
setFirstRow(String userInput)
In HBase, the last row is represented by an empty byte array. |
void |
setLastRow(byte[] userInput)
Set the last row |
void |
setLastRow(String userInput)
In HBase, the last row is represented by an empty byte array. |
byte[] |
split(byte[] start,
byte[] end)
Split a pre-existing region into 2 regions. |
byte[][] |
split(int numRegions)
Split an entire table. |
byte[] |
strToRow(String input)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RegionSplitter.UniformSplit()
| Method Detail |
|---|
public byte[] split(byte[] start,
byte[] end)
RegionSplitter.SplitAlgorithm
split in interface RegionSplitter.SplitAlgorithmstart - first row (inclusive)end - last row (exclusive)
public byte[][] split(int numRegions)
RegionSplitter.SplitAlgorithm
split in interface RegionSplitter.SplitAlgorithmnumRegions - number of regions to split the table into
public byte[] firstRow()
RegionSplitter.SplitAlgorithm
firstRow in interface RegionSplitter.SplitAlgorithmpublic byte[] lastRow()
RegionSplitter.SplitAlgorithm
lastRow in interface RegionSplitter.SplitAlgorithmpublic void setFirstRow(String userInput)
RegionSplitter.SplitAlgorithm
setFirstRow in interface RegionSplitter.SplitAlgorithmuserInput - raw user input (may throw RuntimeException on parse failure)public void setLastRow(String userInput)
RegionSplitter.SplitAlgorithm
setLastRow in interface RegionSplitter.SplitAlgorithmuserInput - raw user input (may throw RuntimeException on parse failure)public void setFirstRow(byte[] userInput)
RegionSplitter.SplitAlgorithm
setFirstRow in interface RegionSplitter.SplitAlgorithmuserInput - byte array of the row key.public void setLastRow(byte[] userInput)
RegionSplitter.SplitAlgorithm
setLastRow in interface RegionSplitter.SplitAlgorithmuserInput - byte array of the row key.public byte[] strToRow(String input)
strToRow in interface RegionSplitter.SplitAlgorithminput - user or file input for row
public String rowToStr(byte[] row)
rowToStr in interface RegionSplitter.SplitAlgorithmrow - byte array representing a row in HBase
public String separator()
separator in interface RegionSplitter.SplitAlgorithmpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||