@InterfaceAudience.Private public class KeyPrefixRegionSplitRestriction extends RegionSplitRestriction
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.
| Modifier and Type | Field and Description |
|---|---|
static String |
PREFIX_LENGTH_KEY |
RESTRICTION_TYPE_DELIMITED_KEY_PREFIX, RESTRICTION_TYPE_KEY, RESTRICTION_TYPE_KEY_PREFIX, RESTRICTION_TYPE_NONE| Constructor and Description |
|---|
KeyPrefixRegionSplitRestriction() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getRestrictedSplitPoint(byte[] splitPoint)
Returns a restricted split point.
|
void |
initialize(TableDescriptor tableDescriptor,
org.apache.hadoop.conf.Configuration conf)
Initialize the RegionSplitRestriction instance
|
createpublic static final String PREFIX_LENGTH_KEY
public void initialize(TableDescriptor tableDescriptor, org.apache.hadoop.conf.Configuration conf) throws IOException
RegionSplitRestrictioninitialize in class RegionSplitRestrictiontableDescriptor - the table descriptorconf - the configurationIOException - if an error occurspublic byte[] getRestrictedSplitPoint(byte[] splitPoint)
RegionSplitRestrictiongetRestrictedSplitPoint in class RegionSplitRestrictionsplitPoint - the split point determined by RegionSplitPolicy or specified by a
user manuallyCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.