Class KeyPrefixRegionSplitRestriction
java.lang.Object
org.apache.hadoop.hbase.regionserver.RegionSplitRestriction
org.apache.hadoop.hbase.regionserver.KeyPrefixRegionSplitRestriction
A
RegionSplitRestriction
implementation that groups rows by a prefix of the row-key.
This ensures that a region is not split "inside" a prefix of a row key. I.e. rows can be co-located in a region by their prefix.
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
static final String
private int
Fields inherited from class org.apache.hadoop.hbase.regionserver.RegionSplitRestriction
RESTRICTION_TYPE_DELIMITED_KEY_PREFIX, RESTRICTION_TYPE_KEY, RESTRICTION_TYPE_KEY_PREFIX, RESTRICTION_TYPE_NONE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getRestrictedSplitPoint
(byte[] splitPoint) Returns a restricted split point.void
initialize
(TableDescriptor tableDescriptor, org.apache.hadoop.conf.Configuration conf) Initialize the RegionSplitRestriction instanceMethods inherited from class org.apache.hadoop.hbase.regionserver.RegionSplitRestriction
create
-
Field Details
-
LOG
-
PREFIX_LENGTH_KEY
- See Also:
-
prefixLength
-
-
Constructor Details
-
KeyPrefixRegionSplitRestriction
public KeyPrefixRegionSplitRestriction()
-
-
Method Details
-
initialize
public void initialize(TableDescriptor tableDescriptor, org.apache.hadoop.conf.Configuration conf) throws IOException Description copied from class:RegionSplitRestriction
Initialize the RegionSplitRestriction instance- Specified by:
initialize
in classRegionSplitRestriction
- Parameters:
tableDescriptor
- the table descriptorconf
- the configuration- Throws:
IOException
- if an error occurs
-
getRestrictedSplitPoint
Description copied from class:RegionSplitRestriction
Returns a restricted split point.- Specified by:
getRestrictedSplitPoint
in classRegionSplitRestriction
- Parameters:
splitPoint
- the split point determined byRegionSplitPolicy
or specified by a user manually- Returns:
- the restricted split point
-