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

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()
           
protected abstract  boolean shouldSplit()
           
 
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. Each

Parameters:
htd -
conf -
Returns:
Throws:
IOException


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.