org.apache.hadoop.hbase.regionserver
Class RegionSplitPolicy
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.regionserver.RegionSplitPolicy
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable
- Direct Known Subclasses:
- ConstantSizeRegionSplitPolicy
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. |
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 |
region
protected HRegion region
- The region configured for this split policy.
RegionSplitPolicy
public RegionSplitPolicy()
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.
Each
- Parameters:
htd
- conf
-
- Returns:
-
- Throws:
IOException
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.