Skip to content

Commit aeacfd3

Browse files
committed
Revert "HBASE-22930 Set unique name to longCompactions/shortCompactions threads (#548)"
This reverts commit 018181c.
1 parent 018181c commit aeacfd3

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -136,22 +136,19 @@ private void createCompactionExecutors() {
136136
Preconditions.checkArgument(largeThreads > 0 && smallThreads > 0);
137137

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

141-
AtomicInteger longCompactionThreadCounter = new AtomicInteger(0);
142-
this.longCompactions =
143-
new ThreadPoolExecutor(largeThreads, largeThreads, 60, TimeUnit.SECONDS, stealJobQueue,
144-
new ThreadFactoryBuilder().setNameFormat(n + "-longCompactions-"
145-
+ longCompactionThreadCounter.getAndIncrement() + "-" + System.currentTimeMillis())
146-
.setDaemon(true).build());
140+
StealJobQueue<Runnable> stealJobQueue = new StealJobQueue<Runnable>(COMPARATOR);
141+
this.longCompactions = new ThreadPoolExecutor(largeThreads, largeThreads, 60,
142+
TimeUnit.SECONDS, stealJobQueue,
143+
new ThreadFactoryBuilder()
144+
.setNameFormat(n + "-longCompactions-" + System.currentTimeMillis())
145+
.setDaemon(true).build());
147146
this.longCompactions.setRejectedExecutionHandler(new Rejection());
148147
this.longCompactions.prestartAllCoreThreads();
149-
150-
AtomicInteger shortCompactionThreadCounter = new AtomicInteger(0);
151-
this.shortCompactions = new ThreadPoolExecutor(smallThreads, smallThreads, 60, TimeUnit.SECONDS,
152-
stealJobQueue.getStealFromQueue(),
153-
new ThreadFactoryBuilder().setNameFormat(n + "-shortCompactions-"
154-
+ shortCompactionThreadCounter.getAndIncrement() + "-" + System.currentTimeMillis())
148+
this.shortCompactions = new ThreadPoolExecutor(smallThreads, smallThreads, 60,
149+
TimeUnit.SECONDS, stealJobQueue.getStealFromQueue(),
150+
new ThreadFactoryBuilder()
151+
.setNameFormat(n + "-shortCompactions-" + System.currentTimeMillis())
155152
.setDaemon(true).build());
156153
this.shortCompactions.setRejectedExecutionHandler(new Rejection());
157154
}

0 commit comments

Comments
 (0)