From 6d2faf43233aa7bde346dde0f81e4d9464872850 Mon Sep 17 00:00:00 2001 From: Xiaolin Ha Date: Tue, 7 Dec 2021 12:19:33 +0800 Subject: [PATCH] HBASE-26525 Use unique thread name for group WALs (#3903) Signed-off-by: Duo Zhang --- .../org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java index f5619d438e9..1e4a2dad993 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncFSWAL.java @@ -239,8 +239,9 @@ public class AsyncFSWAL extends AbstractFSWAL { ThreadPoolExecutor threadPool = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), - new ThreadFactoryBuilder().setNameFormat("AsyncFSWAL-%d-" + rootDir.toString()). - setDaemon(true).build()); + new ThreadFactoryBuilder().setNameFormat("AsyncFSWAL-%d-"+ rootDir.toString() + + "-prefix:" + (prefix == null ? "default" : prefix).replace("%", "%%")) + .setDaemon(true).build()); hasConsumerTask = () -> threadPool.getQueue().peek() == consumer; this.consumeExecutor = threadPool; }