HBASE-26525 Use unique thread name for group WALs (#3903)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
1004e43a44
commit
bdbb4fa087
|
@ -237,8 +237,9 @@ public class AsyncFSWAL extends AbstractFSWAL<AsyncWriter> {
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue