org.apache.hadoop.hbase.regionserver
Class RegionSplitPolicy

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.hadoop.hbase.regionserver.RegionSplitPolicy
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
Direct Known Subclasses:
ConstantSizeRegionSplitPolicy, DisabledRegionSplitPolicy

@InterfaceAudience.LimitedPrivate(value="Configuration")
public abstract class RegionSplitPolicy
extends org.apache.hadoop.conf.Configured

A split policy determines when a region should be split.

See Also:
Default split policy since 0.94.0, Default split policy before 0.94.0

Field Summary
protected  HRegion region
          The region configured for this split policy.
 
Constructor Summary
RegionSplitPolicy()
           
 
Method Summary
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(HTableDescriptor htd, org.apache.hadoop.conf.Configuration conf)
           
protected abstract  boolean shouldSplit()
           
protected  boolean skipStoreFileRangeCheck()
          Deprecated. Use skipStoreFileRangeCheck(String)} instead
protected  boolean skipStoreFileRangeCheck(String familyName)
          See skipStoreFileRangeCheck() javadoc.
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

region

protected HRegion region
The region configured for this split policy.

Constructor Detail

RegionSplitPolicy

public RegionSplitPolicy()
Method Detail

configureForRegion

protected void configureForRegion(HRegion region)
Upon construction, this method will be called with the region to be governed. It will be called once and only once.


shouldSplit

protected abstract boolean shouldSplit()
Returns:
true if the specified region should be split.

getSplitPoint

protected byte[] getSplitPoint()
Returns:
the key at which the region should be split, or null if it cannot be split. This will only be called if shouldSplit previously returned true.

create

public static RegionSplitPolicy create(HRegion region,
                                       org.apache.hadoop.conf.Configuration conf)
                                throws IOException
Create the RegionSplitPolicy configured for the given table.

Parameters:
region -
conf -
Returns:
a RegionSplitPolicy
Throws:
IOException

getSplitPolicyClass

public static Class<? extends RegionSplitPolicy> getSplitPolicyClass(HTableDescriptor htd,
                                                                     org.apache.hadoop.conf.Configuration conf)
                                                              throws IOException
Throws:
IOException

skipStoreFileRangeCheck

@Deprecated
protected boolean skipStoreFileRangeCheck()
Deprecated. Use skipStoreFileRangeCheck(String)} instead

In HRegionFileSystem.splitStoreFile(org.apache.hadoop.hbase.HRegionInfo, String, StoreFile, byte[], boolean, RegionSplitPolicy) we are not creating the split reference if split row not lies in the StoreFile range. But in some use cases we may need to create the split reference even when the split row not lies in the range. This method can be used to decide, whether to skip the the StoreFile range check or not.

Returns:
whether to skip the StoreFile range check or not

skipStoreFileRangeCheck

protected boolean skipStoreFileRangeCheck(String familyName)
See skipStoreFileRangeCheck() javadoc.

Parameters:
familyName -
Returns:
whether to skip the StoreFile range check or not


Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.