HBASE-17972 Remove mergePool from CompactSplitThread
Signed-off-by: tedyu <yuzhihong@gmail.com>
This commit is contained in:
parent
33711fd481
commit
db9994c669
|
@ -74,10 +74,6 @@ public class CompactSplit implements CompactionRequestor, PropagatingConfigurati
|
||||||
public final static String SPLIT_THREADS = "hbase.regionserver.thread.split";
|
public final static String SPLIT_THREADS = "hbase.regionserver.thread.split";
|
||||||
public final static int SPLIT_THREADS_DEFAULT = 1;
|
public final static int SPLIT_THREADS_DEFAULT = 1;
|
||||||
|
|
||||||
// Configuration keys for merge threads
|
|
||||||
public final static String MERGE_THREADS = "hbase.regionserver.thread.merge";
|
|
||||||
public final static int MERGE_THREADS_DEFAULT = 1;
|
|
||||||
|
|
||||||
public static final String REGION_SERVER_REGION_SPLIT_LIMIT =
|
public static final String REGION_SERVER_REGION_SPLIT_LIMIT =
|
||||||
"hbase.regionserver.regionSplitLimit";
|
"hbase.regionserver.regionSplitLimit";
|
||||||
public static final int DEFAULT_REGION_SERVER_REGION_SPLIT_LIMIT= 1000;
|
public static final int DEFAULT_REGION_SERVER_REGION_SPLIT_LIMIT= 1000;
|
||||||
|
@ -88,7 +84,6 @@ public class CompactSplit implements CompactionRequestor, PropagatingConfigurati
|
||||||
private final ThreadPoolExecutor longCompactions;
|
private final ThreadPoolExecutor longCompactions;
|
||||||
private final ThreadPoolExecutor shortCompactions;
|
private final ThreadPoolExecutor shortCompactions;
|
||||||
private final ThreadPoolExecutor splits;
|
private final ThreadPoolExecutor splits;
|
||||||
private final ThreadPoolExecutor mergePool;
|
|
||||||
|
|
||||||
private volatile ThroughputController compactionThroughputController;
|
private volatile ThroughputController compactionThroughputController;
|
||||||
|
|
||||||
|
@ -151,15 +146,6 @@ public class CompactSplit implements CompactionRequestor, PropagatingConfigurati
|
||||||
return new Thread(r, name);
|
return new Thread(r, name);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
int mergeThreads = conf.getInt(MERGE_THREADS, MERGE_THREADS_DEFAULT);
|
|
||||||
this.mergePool = (ThreadPoolExecutor) Executors.newFixedThreadPool(
|
|
||||||
mergeThreads, new ThreadFactory() {
|
|
||||||
@Override
|
|
||||||
public Thread newThread(Runnable r) {
|
|
||||||
String name = n + "-merges-" + System.currentTimeMillis();
|
|
||||||
return new Thread(r, name);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// compaction throughput controller
|
// compaction throughput controller
|
||||||
this.compactionThroughputController =
|
this.compactionThroughputController =
|
||||||
|
|
|
@ -80,7 +80,6 @@ public class TestCompactSplitThread {
|
||||||
conf.setInt(CompactSplit.LARGE_COMPACTION_THREADS, 3);
|
conf.setInt(CompactSplit.LARGE_COMPACTION_THREADS, 3);
|
||||||
conf.setInt(CompactSplit.SMALL_COMPACTION_THREADS, 4);
|
conf.setInt(CompactSplit.SMALL_COMPACTION_THREADS, 4);
|
||||||
conf.setInt(CompactSplit.SPLIT_THREADS, 5);
|
conf.setInt(CompactSplit.SPLIT_THREADS, 5);
|
||||||
conf.setInt(CompactSplit.MERGE_THREADS, 6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
@ -118,7 +117,6 @@ public class TestCompactSplitThread {
|
||||||
conf.setInt(CompactSplit.LARGE_COMPACTION_THREADS, 4);
|
conf.setInt(CompactSplit.LARGE_COMPACTION_THREADS, 4);
|
||||||
conf.setInt(CompactSplit.SMALL_COMPACTION_THREADS, 5);
|
conf.setInt(CompactSplit.SMALL_COMPACTION_THREADS, 5);
|
||||||
conf.setInt(CompactSplit.SPLIT_THREADS, 6);
|
conf.setInt(CompactSplit.SPLIT_THREADS, 6);
|
||||||
conf.setInt(CompactSplit.MERGE_THREADS, 7);
|
|
||||||
try {
|
try {
|
||||||
regionServer.compactSplitThread.onConfigurationChange(conf);
|
regionServer.compactSplitThread.onConfigurationChange(conf);
|
||||||
} catch (IllegalArgumentException iae) {
|
} catch (IllegalArgumentException iae) {
|
||||||
|
@ -134,7 +132,6 @@ public class TestCompactSplitThread {
|
||||||
conf.setInt(CompactSplit.LARGE_COMPACTION_THREADS, 2);
|
conf.setInt(CompactSplit.LARGE_COMPACTION_THREADS, 2);
|
||||||
conf.setInt(CompactSplit.SMALL_COMPACTION_THREADS, 3);
|
conf.setInt(CompactSplit.SMALL_COMPACTION_THREADS, 3);
|
||||||
conf.setInt(CompactSplit.SPLIT_THREADS, 4);
|
conf.setInt(CompactSplit.SPLIT_THREADS, 4);
|
||||||
conf.setInt(CompactSplit.MERGE_THREADS, 5);
|
|
||||||
try {
|
try {
|
||||||
regionServer.compactSplitThread.onConfigurationChange(conf);
|
regionServer.compactSplitThread.onConfigurationChange(conf);
|
||||||
} catch (IllegalArgumentException iae) {
|
} catch (IllegalArgumentException iae) {
|
||||||
|
|
Loading…
Reference in New Issue