public static interface RegionSplitter.SplitAlgorithm
RegionSplitter.HexStringSplit to partition their table and set it as default, but
 provided this for your custom algorithm. To use, create a new derived class
 from this interface and call RegionSplitter.createPresplitTable(org.apache.hadoop.hbase.TableName, org.apache.hadoop.hbase.util.RegionSplitter.SplitAlgorithm, java.lang.String[], org.apache.hadoop.conf.Configuration) or
 RegionSplitter#rollingSplit(TableName, SplitAlgorithm, Configuration) with the
 argument splitClassName giving the name of your class.| Modifier and Type | Method and Description | 
|---|---|
| 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(byte[] start,
     byte[] end,
     int numSplits,
     boolean inclusive)Some MapReduce jobs may want to run multiple mappers per region,
 this is intended for such usecase. | 
| byte[][] | split(int numRegions)Split an entire table. | 
| byte[] | strToRow(String input) | 
byte[] split(byte[] start, byte[] end)
start - first row (inclusive)end - last row (exclusive)byte[][] split(int numRegions)
numRegions - number of regions to split the table intoRuntimeException - user input is validated at this time. may throw a runtime
           exception in response to a parse failurebyte[][] split(byte[] start, byte[] end, int numSplits, boolean inclusive)
start - first row (inclusive)end - last row (exclusive)numSplits - number of splits to generateinclusive - whether start and end are returned as split pointsbyte[] firstRow()
byte[] lastRow()
void setFirstRow(String userInput)
userInput - raw user input (may throw RuntimeException on parse failure)void setLastRow(String userInput)
userInput - raw user input (may throw RuntimeException on parse failure)byte[] strToRow(String input)
input - user or file input for rowString rowToStr(byte[] row)
row - byte array representing a row in HBaseString separator()
void setFirstRow(byte[] userInput)
userInput - byte array of the row key.void setLastRow(byte[] userInput)
userInput - byte array of the row key.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.