Skip to content

Commit

Permalink
Revert "HBASE-22930 Set unique name to longCompactions/shortCompactio…
Browse files Browse the repository at this point in the history
…ns threads (#548)"

This reverts commit 018181c.
  • Loading branch information
saintstack committed Sep 4, 2019
1 parent 018181c commit aeacfd3
Showing 1 changed file with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,22 +136,19 @@ private void createCompactionExecutors() {
Preconditions.checkArgument(largeThreads > 0 && smallThreads > 0);

final String n = Thread.currentThread().getName();
StealJobQueue<Runnable> stealJobQueue = new StealJobQueue<Runnable>(COMPARATOR);

AtomicInteger longCompactionThreadCounter = new AtomicInteger(0);
this.longCompactions =
new ThreadPoolExecutor(largeThreads, largeThreads, 60, TimeUnit.SECONDS, stealJobQueue,
new ThreadFactoryBuilder().setNameFormat(n + "-longCompactions-"
+ longCompactionThreadCounter.getAndIncrement() + "-" + System.currentTimeMillis())
.setDaemon(true).build());
StealJobQueue<Runnable> stealJobQueue = new StealJobQueue<Runnable>(COMPARATOR);
this.longCompactions = new ThreadPoolExecutor(largeThreads, largeThreads, 60,
TimeUnit.SECONDS, stealJobQueue,
new ThreadFactoryBuilder()
.setNameFormat(n + "-longCompactions-" + System.currentTimeMillis())
.setDaemon(true).build());
this.longCompactions.setRejectedExecutionHandler(new Rejection());
this.longCompactions.prestartAllCoreThreads();

AtomicInteger shortCompactionThreadCounter = new AtomicInteger(0);
this.shortCompactions = new ThreadPoolExecutor(smallThreads, smallThreads, 60, TimeUnit.SECONDS,
stealJobQueue.getStealFromQueue(),
new ThreadFactoryBuilder().setNameFormat(n + "-shortCompactions-"
+ shortCompactionThreadCounter.getAndIncrement() + "-" + System.currentTimeMillis())
this.shortCompactions = new ThreadPoolExecutor(smallThreads, smallThreads, 60,
TimeUnit.SECONDS, stealJobQueue.getStealFromQueue(),
new ThreadFactoryBuilder()
.setNameFormat(n + "-shortCompactions-" + System.currentTimeMillis())
.setDaemon(true).build());
this.shortCompactions.setRejectedExecutionHandler(new Rejection());
}
Expand Down

0 comments on commit aeacfd3

Please sign in to comment.