@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 |
---|---|
private static org.slf4j.Logger |
LOG |
static String |
PREFIX_LENGTH_KEY |
private int |
prefixLength |
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
|
create
private static final org.slf4j.Logger LOG
public static final String PREFIX_LENGTH_KEY
private int prefixLength
public KeyPrefixRegionSplitRestriction()
public void initialize(TableDescriptor tableDescriptor, org.apache.hadoop.conf.Configuration conf) throws IOException
RegionSplitRestriction
initialize
in class RegionSplitRestriction
tableDescriptor
- the table descriptorconf
- the configurationIOException
- if an error occurspublic byte[] getRestrictedSplitPoint(byte[] splitPoint)
RegionSplitRestriction
getRestrictedSplitPoint
in class RegionSplitRestriction
splitPoint
- the split point determined by RegionSplitPolicy
or specified by a
user manuallyCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.