Revert "HBASE-22930 Set unique name to longCompactions/shortCompactions threads (#548)"
This reverts commit 018181c7a4
.
This commit is contained in:
parent
018181c7a4
commit
aeacfd3d59
|
@ -136,22 +136,19 @@ public class CompactSplit implements CompactionRequester, PropagatingConfigurati
|
||||||
Preconditions.checkArgument(largeThreads > 0 && smallThreads > 0);
|
Preconditions.checkArgument(largeThreads > 0 && smallThreads > 0);
|
||||||
|
|
||||||
final String n = Thread.currentThread().getName();
|
final String n = Thread.currentThread().getName();
|
||||||
StealJobQueue<Runnable> stealJobQueue = new StealJobQueue<Runnable>(COMPARATOR);
|
|
||||||
|
|
||||||
AtomicInteger longCompactionThreadCounter = new AtomicInteger(0);
|
StealJobQueue<Runnable> stealJobQueue = new StealJobQueue<Runnable>(COMPARATOR);
|
||||||
this.longCompactions =
|
this.longCompactions = new ThreadPoolExecutor(largeThreads, largeThreads, 60,
|
||||||
new ThreadPoolExecutor(largeThreads, largeThreads, 60, TimeUnit.SECONDS, stealJobQueue,
|
TimeUnit.SECONDS, stealJobQueue,
|
||||||
new ThreadFactoryBuilder().setNameFormat(n + "-longCompactions-"
|
new ThreadFactoryBuilder()
|
||||||
+ longCompactionThreadCounter.getAndIncrement() + "-" + System.currentTimeMillis())
|
.setNameFormat(n + "-longCompactions-" + System.currentTimeMillis())
|
||||||
.setDaemon(true).build());
|
.setDaemon(true).build());
|
||||||
this.longCompactions.setRejectedExecutionHandler(new Rejection());
|
this.longCompactions.setRejectedExecutionHandler(new Rejection());
|
||||||
this.longCompactions.prestartAllCoreThreads();
|
this.longCompactions.prestartAllCoreThreads();
|
||||||
|
this.shortCompactions = new ThreadPoolExecutor(smallThreads, smallThreads, 60,
|
||||||
AtomicInteger shortCompactionThreadCounter = new AtomicInteger(0);
|
TimeUnit.SECONDS, stealJobQueue.getStealFromQueue(),
|
||||||
this.shortCompactions = new ThreadPoolExecutor(smallThreads, smallThreads, 60, TimeUnit.SECONDS,
|
new ThreadFactoryBuilder()
|
||||||
stealJobQueue.getStealFromQueue(),
|
.setNameFormat(n + "-shortCompactions-" + System.currentTimeMillis())
|
||||||
new ThreadFactoryBuilder().setNameFormat(n + "-shortCompactions-"
|
|
||||||
+ shortCompactionThreadCounter.getAndIncrement() + "-" + System.currentTimeMillis())
|
|
||||||
.setDaemon(true).build());
|
.setDaemon(true).build());
|
||||||
this.shortCompactions.setRejectedExecutionHandler(new Rejection());
|
this.shortCompactions.setRejectedExecutionHandler(new Rejection());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue