@InterfaceAudience.LimitedPrivate(value="Configuration") public abstract class RegionSplitPolicy extends org.apache.hadoop.conf.Configured
Modifier and Type | Field and Description |
---|---|
private static Class<? extends RegionSplitPolicy> |
DEFAULT_SPLIT_POLICY_CLASS |
protected HRegion |
region
The region configured for this split policy.
|
Constructor and Description |
---|
RegionSplitPolicy() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canSplit()
Returns
true if the specified region can be split. |
protected void |
configureForRegion(HRegion region)
Upon construction, this method will be called with the region to be governed.
|
static RegionSplitPolicy |
create(HRegion region,
org.apache.hadoop.conf.Configuration conf)
Create the RegionSplitPolicy configured for the given table.
|
protected byte[] |
getSplitPoint() |
static Class<? extends RegionSplitPolicy> |
getSplitPolicyClass(TableDescriptor htd,
org.apache.hadoop.conf.Configuration conf) |
protected abstract boolean |
shouldSplit()
Returns true if the specified region should be split.
|
protected boolean |
skipStoreFileRangeCheck(String familyName)
In
HRegionFileSystem.splitStoreFile(org.apache.hadoop.hbase.client.RegionInfo, String, HStoreFile, byte[], boolean, RegionSplitPolicy)
we are not creating the split reference if split row does not lie inside the StoreFile range. |
private static final Class<? extends RegionSplitPolicy> DEFAULT_SPLIT_POLICY_CLASS
public RegionSplitPolicy()
protected void configureForRegion(HRegion region)
protected abstract boolean shouldSplit()
protected boolean canSplit()
true
if the specified region can be split.protected byte[] getSplitPoint()
public static RegionSplitPolicy create(HRegion region, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public static Class<? extends RegionSplitPolicy> getSplitPolicyClass(TableDescriptor htd, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
protected boolean skipStoreFileRangeCheck(String familyName)
HRegionFileSystem.splitStoreFile(org.apache.hadoop.hbase.client.RegionInfo, String, HStoreFile, byte[], boolean, RegionSplitPolicy)
we are not creating the split reference if split row does not lie inside the StoreFile range.
But in some use cases we may need to create the split reference even when the split row does
not lie inside the StoreFile range. This method can be used to decide, whether to skip the the
StoreFile range check or not.
This method is not for general use. It is a mechanism put in place by Phoenix local indexing to defeat standard hbase behaviors. Phoenix local indices are very likely the only folks who would make use of this method. On the Master-side, we will instantiate a RegionSplitPolicy instance and run this method ONLY... none of the others make sense on the Master-side.
TODO: Shutdown this phoenix specialization or do it via some other means.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.