Skip to content

Commit c7248ab

Browse files
szucsvillosunhelly
andauthored
HBASE-26525 Use unique thread name for group WALs (#3903)(#5895)
Change-Id: I351a7dcc8da8620ef472753f1bbdbb5a209276cf Co-authored-by: haxiaolin <haxiaolin@apache.org> Signed-off-by: Duo Zhang <zhangduo@apache.org>
1 parent 709035d commit c7248ab

File tree

1 file changed

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

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,11 @@ public AsyncFSWAL(FileSystem fs, Abortable abortable, Path rootDir, String logDi
234234
hasConsumerTask = () -> false;
235235
}
236236
} else {
237-
ThreadPoolExecutor threadPool = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS,
238-
new LinkedBlockingQueue<Runnable>(), new ThreadFactoryBuilder()
239-
.setNameFormat("AsyncFSWAL-%d-" + rootDir.toString()).setDaemon(true).build());
237+
ThreadPoolExecutor threadPool =
238+
new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(),
239+
new ThreadFactoryBuilder().setNameFormat("AsyncFSWAL-%d-" + rootDir.toString()
240+
+ "-prefix:" + (prefix == null ? "default" : prefix).replace("%", "%%")).setDaemon(true)
241+
.build());
240242
hasConsumerTask = () -> threadPool.getQueue().peek() == consumer;
241243
this.consumeExecutor = threadPool;
242244
}

0 commit comments

Comments
 (0)