Class DelimitedKeyPrefixRegionSplitRestriction
java.lang.Object
org.apache.hadoop.hbase.regionserver.RegionSplitRestriction
org.apache.hadoop.hbase.regionserver.DelimitedKeyPrefixRegionSplitRestriction
A
RegionSplitRestriction
implementation that groups rows by a prefix of the row-key with
a delimiter. Only the first delimiter for the row key will define the prefix of the row key that
is used for grouping.
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. As an example, if you have row keys delimited with
_
, like userid_eventtype_eventid
, and use prefix delimiter _, this
split policy ensures that all rows starting with the same userid, belongs to the same region.
-
Field Summary
Modifier and TypeFieldDescriptionprivate byte[]
static final String
private static final org.slf4j.Logger
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
-
DELIMITER_KEY
- See Also:
-
delimiter
-
-
Constructor Details
-
DelimitedKeyPrefixRegionSplitRestriction
-
-
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
-