org.apache.hadoop.hbase.regionserver
Class CompactSplitThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.apache.hadoop.hbase.regionserver.CompactSplitThread
All Implemented Interfaces:
Runnable, CompactionRequestor

public class CompactSplitThread
extends Thread
implements CompactionRequestor

Compact region on request and then run split if appropriate


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static int PRIORITY_USER
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
CompactSplitThread(HRegionServer server)
           
 
Method Summary
 int getCompactionQueueSize()
          Returns the current size of the queue containing regions that are processed.
 int getRegionSplitLimit()
           
 void requestCompaction(HRegion r, boolean force, String why, int priority)
           
 void requestCompaction(HRegion r, String why)
           
 void requestCompaction(HRegion r, String why, int p)
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PRIORITY_USER

public static final int PRIORITY_USER
See Also:
Constant Field Values
Constructor Detail

CompactSplitThread

public CompactSplitThread(HRegionServer server)
Parameters:
server -
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

requestCompaction

public void requestCompaction(HRegion r,
                              String why)
Specified by:
requestCompaction in interface CompactionRequestor
Parameters:
r - Region to compact
why - Why compaction was requested -- used in debug messages

requestCompaction

public void requestCompaction(HRegion r,
                              String why,
                              int p)
Specified by:
requestCompaction in interface CompactionRequestor
Parameters:
r - Region to compact
why - Why compaction was requested -- used in debug messages
p - Priority of this compaction. minHeap. <=0 is critical

requestCompaction

public void requestCompaction(HRegion r,
                              boolean force,
                              String why,
                              int priority)
Parameters:
r - HRegion store belongs to
force - Whether next compaction should be major
why - Why compaction requested -- used in debug messages

getCompactionQueueSize

public int getCompactionQueueSize()
Returns the current size of the queue containing regions that are processed.

Returns:
The current size of the regions queue.

getRegionSplitLimit

public int getRegionSplitLimit()
Returns:
the regionSplitLimit


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