Skip to content

Commit 149d055

Browse files
authored
Set ThreadFactory for Executor in EntryLoggerAllocator (#4562)
1 parent 606db74 commit 149d055

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLoggerAllocator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import io.netty.buffer.ByteBuf;
2929
import io.netty.buffer.ByteBufAllocator;
3030
import io.netty.buffer.Unpooled;
31+
import io.netty.util.concurrent.DefaultThreadFactory;
3132
import java.io.BufferedWriter;
3233
import java.io.File;
3334
import java.io.FileOutputStream;
@@ -76,7 +77,8 @@ class EntryLoggerAllocator {
7677
this.preallocatedLogId = logId;
7778
this.recentlyCreatedEntryLogsStatus = recentlyCreatedEntryLogsStatus;
7879
this.entryLogPreAllocationEnabled = conf.isEntryLogFilePreAllocationEnabled();
79-
this.allocatorExecutor = Executors.newSingleThreadExecutor();
80+
this.allocatorExecutor = Executors.newSingleThreadExecutor(
81+
new DefaultThreadFactory("EntryLoggerAllocator"));
8082

8183
// Initialize the entry log header buffer. This cannot be a static object
8284
// since in our unit tests, we run multiple Bookies and thus EntryLoggers

0 commit comments

Comments
 (0)