@InterfaceAudience.Private public class CompactSplit extends Object implements CompactionRequester, PropagatingConfigurationObserver
| Modifier and Type | Class and Description | 
|---|---|
| private static class  | CompactSplit.AggregatingCompleteTracker | 
| private static interface  | CompactSplit.CompactionCompleteTracker | 
| private class  | CompactSplit.CompactionRunner | 
| private static class  | CompactSplit.RejectionCleanup class to use when rejecting a compaction request from the queue. | 
| Modifier and Type | Field and Description | 
|---|---|
| private ThroughputController | compactionThroughputController | 
| private static Comparator<Runnable> | COMPARATOR | 
| private org.apache.hadoop.conf.Configuration | conf | 
| static int | DEFAULT_REGION_SERVER_REGION_SPLIT_LIMIT | 
| private static CompactSplit.CompactionCompleteTracker | DUMMY_COMPLETE_TRACKER | 
| static String | LARGE_COMPACTION_THREADS | 
| static int | LARGE_COMPACTION_THREADS_DEFAULT | 
| private static org.slf4j.Logger | LOG | 
| private ThreadPoolExecutor | longCompactions | 
| static String | REGION_SERVER_REGION_SPLIT_LIMIT | 
| private int | regionSplitLimitSplitting should not take place if the total number of regions exceed this. | 
| private HRegionServer | server | 
| private ThreadPoolExecutor | shortCompactions | 
| static String | SMALL_COMPACTION_THREADS | 
| static int | SMALL_COMPACTION_THREADS_DEFAULT | 
| static String | SPLIT_THREADS | 
| static int | SPLIT_THREADS_DEFAULT | 
| private ThreadPoolExecutor | splits | 
| Constructor and Description | 
|---|
| CompactSplit(HRegionServer server) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | clearLongCompactionsQueue() | 
| void | clearShortCompactionsQueue() | 
| void | deregisterChildren(ConfigurationManager manager)Needs to be called to deregister the children from the manager. | 
| String | dumpQueue() | 
| int | getCompactionQueueSize()Returns the current size of the queue containing regions that are
 processed. | 
| ThroughputController | getCompactionThroughputController() | 
| private CompactSplit.CompactionCompleteTracker | getCompleteTracker(CompactionLifeCycleTracker tracker,
                  IntSupplier numberOfStores) | 
| int | getLargeCompactionQueueSize() | 
| protected int | getLargeCompactionThreadNum() | 
| int | getRegionSplitLimit() | 
| int | getSmallCompactionQueueSize() | 
| protected int | getSmallCompactionThreadNum() | 
| int | getSplitQueueSize() | 
| protected int | getSplitThreadNum() | 
| (package private) void | interruptIfNecessary()Only interrupt once it's done with a run through the work loop. | 
| (package private) void | join() | 
| void | onConfigurationChange(org.apache.hadoop.conf.Configuration newConf)This method would be called by the  ConfigurationManagerobject when theConfigurationobject is reloaded from disk. | 
| void | registerChildren(ConfigurationManager manager)Needs to be called to register the children to the manager. | 
| void | requestCompaction(HRegion region,
                 HStore store,
                 String why,
                 int priority,
                 CompactionLifeCycleTracker tracker,
                 User user)Request compaction on the given store. | 
| void | requestCompaction(HRegion region,
                 String why,
                 int priority,
                 CompactionLifeCycleTracker tracker,
                 User user)Request compaction on all the stores of the given region. | 
| private void | requestCompactionInternal(HRegion region,
                         HStore store,
                         String why,
                         int priority,
                         boolean selectNow,
                         CompactionLifeCycleTracker tracker,
                         CompactSplit.CompactionCompleteTracker completeTracker,
                         User user) | 
| private void | requestCompactionInternal(HRegion region,
                         String why,
                         int priority,
                         boolean selectNow,
                         CompactionLifeCycleTracker tracker,
                         CompactSplit.CompactionCompleteTracker completeTracker,
                         User user) | 
| boolean | requestSplit(Region r) | 
| void | requestSplit(Region r,
            byte[] midKey) | 
| void | requestSplit(Region r,
            byte[] midKey,
            User user) | 
| void | requestSystemCompaction(HRegion region,
                       HStore store,
                       String why) | 
| void | requestSystemCompaction(HRegion region,
                       String why) | 
| private Optional<CompactionContext> | selectCompaction(HRegion region,
                HStore store,
                int priority,
                CompactionLifeCycleTracker tracker,
                CompactSplit.CompactionCompleteTracker completeTracker,
                User user) | 
| private boolean | shouldSplitRegion() | 
| (package private) void | shutdownLongCompactions() | 
| String | toString() | 
| private void | waitFor(ThreadPoolExecutor t,
       String name) | 
private static final org.slf4j.Logger LOG
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 REGION_SERVER_REGION_SPLIT_LIMIT
public static final int DEFAULT_REGION_SERVER_REGION_SPLIT_LIMIT
private final HRegionServer server
private final org.apache.hadoop.conf.Configuration conf
private final ThreadPoolExecutor longCompactions
private final ThreadPoolExecutor shortCompactions
private final ThreadPoolExecutor splits
private volatile ThroughputController compactionThroughputController
private int regionSplitLimit
private static final CompactSplit.CompactionCompleteTracker DUMMY_COMPLETE_TRACKER
private static final Comparator<Runnable> COMPARATOR
CompactSplit(HRegionServer server)
server - public boolean requestSplit(Region r)
public void requestSplit(Region r, byte[] midKey)
public void requestSplit(Region r, byte[] midKey, User user)
private CompactSplit.CompactionCompleteTracker getCompleteTracker(CompactionLifeCycleTracker tracker, IntSupplier numberOfStores)
public void requestCompaction(HRegion region, String why, int priority, CompactionLifeCycleTracker tracker, User user) throws IOException
CompactionRequesterrequestCompaction in interface CompactionRequesterIOExceptionpublic void requestCompaction(HRegion region, HStore store, String why, int priority, CompactionLifeCycleTracker tracker, User user) throws IOException
CompactionRequesterrequestCompaction in interface CompactionRequesterIOExceptionprivate void requestCompactionInternal(HRegion region, String why, int priority, boolean selectNow, CompactionLifeCycleTracker tracker, CompactSplit.CompactionCompleteTracker completeTracker, User user) throws IOException
IOExceptionprivate void requestCompactionInternal(HRegion region, HStore store, String why, int priority, boolean selectNow, CompactionLifeCycleTracker tracker, CompactSplit.CompactionCompleteTracker completeTracker, User user) throws IOException
IOExceptionpublic void requestSystemCompaction(HRegion region, String why) throws IOException
IOExceptionpublic void requestSystemCompaction(HRegion region, HStore store, String why) throws IOException
IOExceptionprivate Optional<CompactionContext> selectCompaction(HRegion region, HStore store, int priority, CompactionLifeCycleTracker tracker, CompactSplit.CompactionCompleteTracker completeTracker, User user) throws IOException
IOExceptionvoid interruptIfNecessary()
private void waitFor(ThreadPoolExecutor t, String name)
void join()
public int getCompactionQueueSize()
public int getLargeCompactionQueueSize()
public int getSmallCompactionQueueSize()
public int getSplitQueueSize()
private boolean shouldSplitRegion()
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 ConfigurationObserverprotected int getSmallCompactionThreadNum()
protected int getLargeCompactionThreadNum()
protected int getSplitThreadNum()
public void registerChildren(ConfigurationManager manager)
registerChildren in interface PropagatingConfigurationObservermanager - : to register topublic void deregisterChildren(ConfigurationManager manager)
deregisterChildren in interface PropagatingConfigurationObservermanager - : to deregister frompublic ThroughputController getCompactionThroughputController()
void shutdownLongCompactions()
public void clearLongCompactionsQueue()
public void clearShortCompactionsQueue()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.