Skip to content

Commit

Permalink
HBASE-26525 Use unique thread name for group WALs (apache#3903)
Browse files Browse the repository at this point in the history
Signed-off-by: Duo Zhang <[email protected]>
  • Loading branch information
sunhelly authored Dec 7, 2021
1 parent 1004e43 commit bdbb4fa
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,9 @@ public AsyncFSWAL(FileSystem fs, Abortable abortable, Path rootDir, String logDi
ThreadPoolExecutor threadPool =
new ThreadPoolExecutor(1, 1, 0L,
TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(),
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;
}
Expand Down

0 comments on commit bdbb4fa

Please sign in to comment.