@InterfaceAudience.Private public class CompactSplitThread extends java.lang.Object implements CompactionRequestor, PropagatingConfigurationObserver
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_REGION_SERVER_REGION_SPLIT_LIMIT |
static java.lang.String |
LARGE_COMPACTION_THREADS |
static int |
LARGE_COMPACTION_THREADS_DEFAULT |
static java.lang.String |
MERGE_THREADS |
static int |
MERGE_THREADS_DEFAULT |
static java.lang.String |
REGION_SERVER_REGION_SPLIT_LIMIT |
static java.lang.String |
SMALL_COMPACTION_THREADS |
static int |
SMALL_COMPACTION_THREADS_DEFAULT |
static java.lang.String |
SPLIT_THREADS |
static int |
SPLIT_THREADS_DEFAULT |
| Modifier and Type | Method and Description |
|---|---|
void |
deregisterChildren(ConfigurationManager manager)
Needs to be called to deregister the children from the manager.
|
java.lang.String |
dumpQueue() |
int |
getCompactionQueueSize()
Returns the current size of the queue containing regions that are
processed.
|
CompactionThroughputController |
getCompactionThroughputController() |
int |
getLargeCompactionQueueSize() |
int |
getLargeCompactionThreadNum() |
int |
getRegionSplitLimit() |
int |
getSmallCompactionQueueSize() |
protected int |
getSmallCompactionThreadNum() |
int |
getSplitQueueSize() |
void |
onConfigurationChange(Configuration newConf)
This method would be called by the
ConfigurationManager
object when the Configuration object is reloaded from disk. |
void |
registerChildren(ConfigurationManager manager)
Needs to be called to register the children to the manager.
|
CompactionRequest |
requestCompaction(Region r,
Store s,
java.lang.String why,
CompactionRequest request) |
CompactionRequest |
requestCompaction(Region r,
Store s,
java.lang.String why,
int priority,
CompactionRequest request,
User user) |
java.util.List<CompactionRequest> |
requestCompaction(Region r,
java.lang.String why) |
java.util.List<CompactionRequest> |
requestCompaction(Region r,
java.lang.String why,
int p,
java.util.List<Pair<CompactionRequest,Store>> requests,
User user) |
java.util.List<CompactionRequest> |
requestCompaction(Region r,
java.lang.String why,
java.util.List<Pair<CompactionRequest,Store>> requests) |
void |
requestRegionsMerge(Region a,
Region b,
boolean forcible,
long masterSystemTime,
User user) |
boolean |
requestSplit(Region r) |
void |
requestSplit(Region r,
byte[] midKey) |
void |
requestSplit(Region r,
byte[] midKey,
User user) |
void |
requestSystemCompaction(Region r,
Store s,
java.lang.String why) |
void |
requestSystemCompaction(Region r,
java.lang.String why) |
java.lang.String |
toString() |
public static final java.lang.String LARGE_COMPACTION_THREADS
public static final int LARGE_COMPACTION_THREADS_DEFAULT
public static final java.lang.String SMALL_COMPACTION_THREADS
public static final int SMALL_COMPACTION_THREADS_DEFAULT
public static final java.lang.String SPLIT_THREADS
public static final int SPLIT_THREADS_DEFAULT
public static final java.lang.String MERGE_THREADS
public static final int MERGE_THREADS_DEFAULT
public static final java.lang.String REGION_SERVER_REGION_SPLIT_LIMIT
public static final int DEFAULT_REGION_SERVER_REGION_SPLIT_LIMIT
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String dumpQueue()
public void requestRegionsMerge(Region a, Region b, boolean forcible, long masterSystemTime, User user)
public boolean requestSplit(Region r)
public void requestSplit(Region r, byte[] midKey)
public java.util.List<CompactionRequest> requestCompaction(Region r, java.lang.String why) throws java.io.IOException
requestCompaction in interface CompactionRequestorr - Region to compactwhy - Why compaction was requested -- used in debug messagesCompactionRequests or an empty list if no
compactions were startedjava.io.IOExceptionpublic java.util.List<CompactionRequest> requestCompaction(Region r, java.lang.String why, java.util.List<Pair<CompactionRequest,Store>> requests) throws java.io.IOException
requestCompaction in interface CompactionRequestorr - Region to compactwhy - Why compaction was requested -- used in debug messagesrequests - custom compaction requests. Each compaction must specify the store on which it
is acting. Can be null in which case a compaction will be attempted on all
stores for the region.CompactionRequests or an empty list if no
compactions were startedjava.io.IOExceptionpublic CompactionRequest requestCompaction(Region r, Store s, java.lang.String why, CompactionRequest request) throws java.io.IOException
requestCompaction in interface CompactionRequestorr - Region to compacts - Store within region to compactwhy - Why compaction was requested -- used in debug messagesrequest - custom compaction request for the Region and Store. Custom
request must be null or be constructed with matching region and store.CompactionRequest or null if no compaction was started.java.io.IOExceptionpublic java.util.List<CompactionRequest> requestCompaction(Region r, java.lang.String why, int p, java.util.List<Pair<CompactionRequest,Store>> requests, User user) throws java.io.IOException
requestCompaction in interface CompactionRequestorr - Region to compactwhy - Why compaction was requested -- used in debug messagesp - Priority of this compaction. minHeap. <=0 is criticalrequests - custom compaction requests. Each compaction must specify the store on which it
is acting. Can be null in which case a compaction will be attempted on all
stores for the region.user - the effective userCompactionRequests or an empty list if no
compactions were started.java.io.IOExceptionpublic CompactionRequest requestCompaction(Region r, Store s, java.lang.String why, int priority, CompactionRequest request, User user) throws java.io.IOException
requestCompaction in interface CompactionRequestorr - Region to compacts - Store within region to compactwhy - Why compaction was requested -- used in debug messagespriority - Priority of this compaction. minHeap. <=0 is criticalrequest - custom compaction request to run. Store and Region for the
request must match the region and store specified here.CompactionRequest or null if no compaction was startedjava.io.IOExceptionpublic void requestSystemCompaction(Region r, java.lang.String why) throws java.io.IOException
java.io.IOExceptionpublic void requestSystemCompaction(Region r, Store s, java.lang.String why) throws java.io.IOException
java.io.IOExceptionpublic int getCompactionQueueSize()
public int getLargeCompactionQueueSize()
public int getSmallCompactionQueueSize()
public int getSplitQueueSize()
public int getRegionSplitLimit()
public void onConfigurationChange(Configuration newConf)
ConfigurationManager
object when the Configuration object is reloaded from disk.onConfigurationChange in interface ConfigurationObserverprotected int getSmallCompactionThreadNum()
public int getLargeCompactionThreadNum()
public void registerChildren(ConfigurationManager manager)
registerChildren in interface PropagatingConfigurationObservermanager - : to register topublic void deregisterChildren(ConfigurationManager manager)
deregisterChildren in interface PropagatingConfigurationObservermanager - : to deregister frompublic CompactionThroughputController getCompactionThroughputController()