@InterfaceAudience.Private public class CompactSplitThread extends Object implements CompactionRequestor, PropagatingConfigurationObserver
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_REGION_SERVER_REGION_SPLIT_LIMIT |
static String |
LARGE_COMPACTION_THREADS |
static int |
LARGE_COMPACTION_THREADS_DEFAULT |
static String |
MERGE_THREADS |
static int |
MERGE_THREADS_DEFAULT |
static String |
REGION_SERVER_REGION_SPLIT_LIMIT |
static String |
SMALL_COMPACTION_THREADS |
static int |
SMALL_COMPACTION_THREADS_DEFAULT |
static String |
SPLIT_THREADS |
static int |
SPLIT_THREADS_DEFAULT |
public static final String LARGE_COMPACTION_THREADS
public static final int LARGE_COMPACTION_THREADS_DEFAULT
public static final String SMALL_COMPACTION_THREADS
public static final int SMALL_COMPACTION_THREADS_DEFAULT
public static final String SPLIT_THREADS
public static final int SPLIT_THREADS_DEFAULT
public static final String MERGE_THREADS
public static final int MERGE_THREADS_DEFAULT
public static final String REGION_SERVER_REGION_SPLIT_LIMIT
public static final int DEFAULT_REGION_SERVER_REGION_SPLIT_LIMIT
public 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 List<CompactionRequest> requestCompaction(Region r, String why) throws IOException
requestCompaction
in interface CompactionRequestor
r
- Region to compactwhy
- Why compaction was requested -- used in debug messagesCompactionRequests
or an empty list if no
compactions were startedIOException
public List<CompactionRequest> requestCompaction(Region r, String why, List<Pair<CompactionRequest,Store>> requests) throws IOException
requestCompaction
in interface CompactionRequestor
r
- 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 startedIOException
public CompactionRequest requestCompaction(Region r, Store s, String why, CompactionRequest request) throws IOException
requestCompaction
in interface CompactionRequestor
r
- 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.IOException
public List<CompactionRequest> requestCompaction(Region r, String why, int p, List<Pair<CompactionRequest,Store>> requests, User user) throws IOException
requestCompaction
in interface CompactionRequestor
r
- 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.IOException
public CompactionRequest requestCompaction(Region r, Store s, String why, int priority, CompactionRequest request, User user) throws IOException
requestCompaction
in interface CompactionRequestor
r
- 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 startedIOException
public void requestSystemCompaction(Region r, String why) throws IOException
IOException
public void requestSystemCompaction(Region r, Store s, String why) throws IOException
IOException
public int getCompactionQueueSize()
public int getLargeCompactionQueueSize()
public int getSmallCompactionQueueSize()
public int getSplitQueueSize()
public int getRegionSplitLimit()
public void onConfigurationChange(org.apache.hadoop.conf.Configuration newConf)
ConfigurationManager
object when the Configuration
object is reloaded from disk.onConfigurationChange
in interface ConfigurationObserver
protected int getSmallCompactionThreadNum()
protected int getLargeCompactionThreadNum()
protected int getSplitThreadNum()
protected int getMergeThreadNum()
public void registerChildren(ConfigurationManager manager)
registerChildren
in interface PropagatingConfigurationObserver
manager
- : to register topublic void deregisterChildren(ConfigurationManager manager)
deregisterChildren
in interface PropagatingConfigurationObserver
manager
- : to deregister frompublic ThroughputController getCompactionThroughputController()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.