Skip to content

Commit 6d2faf4

Browse files
committed
HBASE-26525 Use unique thread name for group WALs (#3903)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
1 parent 17750a7 commit 6d2faf4

File tree

1 file changed

+3
-2
lines changed
  • hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,9 @@ public AsyncFSWAL(FileSystem fs, Abortable abortable, Path rootDir, String logDi
239239
ThreadPoolExecutor threadPool =
240240
new ThreadPoolExecutor(1, 1, 0L,
241241
TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(),
242-
new ThreadFactoryBuilder().setNameFormat("AsyncFSWAL-%d-" + rootDir.toString()).
243-
setDaemon(true).build());
242+
new ThreadFactoryBuilder().setNameFormat("AsyncFSWAL-%d-"+ rootDir.toString() +
243+
"-prefix:" + (prefix == null ? "default" : prefix).replace("%", "%%"))
244+
.setDaemon(true).build());
244245
hasConsumerTask = () -> threadPool.getQueue().peek() == consumer;
245246
this.consumeExecutor = threadPool;
246247
}

0 commit comments

Comments
 (0)