org.apache.hadoop.hbase.regionserver.compactions
Class PressureAwareCompactionThroughputController

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.hadoop.hbase.regionserver.compactions.PressureAwareCompactionThroughputController
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, CompactionThroughputController, Stoppable

@InterfaceAudience.LimitedPrivate(value="Configuration")
public class PressureAwareCompactionThroughputController
extends org.apache.hadoop.conf.Configured
implements CompactionThroughputController, Stoppable

A throughput controller which uses the follow schema to limit throughput

See Also:
Store.getCompactionPressure()

Field Summary
static String HBASE_HSTORE_COMPACTION_MAX_THROUGHPUT_HIGHER_BOUND
           
static String HBASE_HSTORE_COMPACTION_MAX_THROUGHPUT_LOWER_BOUND
           
static String HBASE_HSTORE_COMPACTION_MAX_THROUGHPUT_OFFPEAK
           
static String HBASE_HSTORE_COMPACTION_THROUGHPUT_TUNE_PERIOD
           
 
Constructor Summary
PressureAwareCompactionThroughputController()
           
 
Method Summary
 long control(String compactionName, long size)
          Control the compaction throughput.
 void finish(String compactionName)
          Finish a compaction.
 boolean isStopped()
           
 void setConf(org.apache.hadoop.conf.Configuration conf)
           
 void setup(RegionServerServices server)
          Setup controller for the given region server.
 void start(String compactionName)
          Start a compaction.
 void stop(String why)
           
 String toString()
           
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HBASE_HSTORE_COMPACTION_MAX_THROUGHPUT_HIGHER_BOUND

public static final String HBASE_HSTORE_COMPACTION_MAX_THROUGHPUT_HIGHER_BOUND
See Also:
Constant Field Values

HBASE_HSTORE_COMPACTION_MAX_THROUGHPUT_LOWER_BOUND

public static final String HBASE_HSTORE_COMPACTION_MAX_THROUGHPUT_LOWER_BOUND
See Also:
Constant Field Values

HBASE_HSTORE_COMPACTION_MAX_THROUGHPUT_OFFPEAK

public static final String HBASE_HSTORE_COMPACTION_MAX_THROUGHPUT_OFFPEAK
See Also:
Constant Field Values

HBASE_HSTORE_COMPACTION_THROUGHPUT_TUNE_PERIOD

public static final String HBASE_HSTORE_COMPACTION_THROUGHPUT_TUNE_PERIOD
See Also:
Constant Field Values
Constructor Detail

PressureAwareCompactionThroughputController

public PressureAwareCompactionThroughputController()
Method Detail

setup

public void setup(RegionServerServices server)
Description copied from interface: CompactionThroughputController
Setup controller for the given region server.

Specified by:
setup in interface CompactionThroughputController

setConf

public void setConf(org.apache.hadoop.conf.Configuration conf)
Specified by:
setConf in interface org.apache.hadoop.conf.Configurable
Overrides:
setConf in class org.apache.hadoop.conf.Configured

start

public void start(String compactionName)
Description copied from interface: CompactionThroughputController
Start a compaction.

Specified by:
start in interface CompactionThroughputController

control

public long control(String compactionName,
                    long size)
             throws InterruptedException
Description copied from interface: CompactionThroughputController
Control the compaction throughput. Will sleep if too fast.

Specified by:
control in interface CompactionThroughputController
Returns:
the actual sleep time.
Throws:
InterruptedException

finish

public void finish(String compactionName)
Description copied from interface: CompactionThroughputController
Finish a compaction. Should call this method in a finally block.

Specified by:
finish in interface CompactionThroughputController

stop

public void stop(String why)
Specified by:
stop in interface Stoppable

isStopped

public boolean isStopped()
Specified by:
isStopped in interface Stoppable

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2015 The Apache Software Foundation. All Rights Reserved.