HBASE-26525 Use unique thread name for group WALs (#3903)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
17750a72f5
commit
6d2faf4323
|
@ -239,8 +239,9 @@ public class AsyncFSWAL extends AbstractFSWAL<AsyncWriter> {
|
||||||
ThreadPoolExecutor threadPool =
|
ThreadPoolExecutor threadPool =
|
||||||
new ThreadPoolExecutor(1, 1, 0L,
|
new ThreadPoolExecutor(1, 1, 0L,
|
||||||
TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(),
|
TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(),
|
||||||
new ThreadFactoryBuilder().setNameFormat("AsyncFSWAL-%d-" + rootDir.toString()).
|
new ThreadFactoryBuilder().setNameFormat("AsyncFSWAL-%d-"+ rootDir.toString() +
|
||||||
setDaemon(true).build());
|
"-prefix:" + (prefix == null ? "default" : prefix).replace("%", "%%"))
|
||||||
|
.setDaemon(true).build());
|
||||||
hasConsumerTask = () -> threadPool.getQueue().peek() == consumer;
|
hasConsumerTask = () -> threadPool.getQueue().peek() == consumer;
|
||||||
this.consumeExecutor = threadPool;
|
this.consumeExecutor = threadPool;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue