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
FieldsModifier and TypeFieldDescriptionprivate byte[]static final Stringprivate static final org.slf4j.LoggerFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getRestrictedSplitPoint(byte[] splitPoint) Returns a restricted split point.voidinitialize(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:RegionSplitRestrictionInitialize the RegionSplitRestriction instance- Specified by:
initializein classRegionSplitRestriction- Parameters:
tableDescriptor- the table descriptorconf- the configuration- Throws:
IOException- if an error occurs
-
getRestrictedSplitPoint
Description copied from class:RegionSplitRestrictionReturns a restricted split point.- Specified by:
getRestrictedSplitPointin classRegionSplitRestriction- Parameters:
splitPoint- the split point determined byRegionSplitPolicyor specified by a user manually- Returns:
- the restricted split point
-