org.apache.hadoop.hbase.regionserver.compactions
Interface CompactionThroughputController

All Superinterfaces:
Stoppable
All Known Implementing Classes:
NoLimitCompactionThroughputController, PressureAwareCompactionThroughputController

@InterfaceAudience.LimitedPrivate(value="Configuration")
public interface CompactionThroughputController
extends Stoppable

A utility that constrains the total throughput of one or more simultaneous flows (compactions) by sleeping when necessary.


Method Summary
 long control(String compactionName, long size)
          Control the compaction throughput.
 void finish(String compactionName)
          Finish a compaction.
 void setup(RegionServerServices server)
          Setup controller for the given region server.
 void start(String compactionName)
          Start a compaction.
 
Methods inherited from interface org.apache.hadoop.hbase.Stoppable
isStopped, stop
 

Method Detail

setup

void setup(RegionServerServices server)
Setup controller for the given region server.


start

void start(String compactionName)
Start a compaction.


control

long control(String compactionName,
             long size)
             throws InterruptedException
Control the compaction throughput. Will sleep if too fast.

Returns:
the actual sleep time.
Throws:
InterruptedException

finish

void finish(String compactionName)
Finish a compaction. Should call this method in a finally block.



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