159159public class RemoteLogManager implements Closeable {
160160
161161 private static final Logger LOGGER = LoggerFactory .getLogger (RemoteLogManager .class );
162- private static final String REMOTE_LOG_READER_THREAD_NAME_PREFIX = "remote-log-reader-%d" ;
162+ private static final String REMOTE_LOG_READER_THREAD_NAME_PATTERN = "remote-log-reader-%d" ;
163163 private final RemoteLogManagerConfig rlmConfig ;
164164 private final int brokerId ;
165165 private final String logDir ;
@@ -263,7 +263,7 @@ public RemoteLogManager(RemoteLogManagerConfig rlmConfig,
263263 TimeUnit .MILLISECONDS , TimeUnit .SECONDS );
264264
265265 remoteStorageReaderThreadPool = new RemoteStorageThreadPool (
266- REMOTE_LOG_READER_THREAD_NAME_PREFIX ,
266+ REMOTE_LOG_READER_THREAD_NAME_PATTERN ,
267267 rlmConfig .remoteLogReaderThreads (),
268268 rlmConfig .remoteLogReaderMaxPendingTasks ()
269269 );
@@ -2168,12 +2168,12 @@ static class RLMScheduledThreadPool {
21682168
21692169 private static final Logger LOGGER = LoggerFactory .getLogger (RLMScheduledThreadPool .class );
21702170 private final String threadPoolName ;
2171- private final String threadNamePrefix ;
2171+ private final String threadNamePattern ;
21722172 private final ScheduledThreadPoolExecutor scheduledThreadPool ;
21732173
2174- public RLMScheduledThreadPool (int poolSize , String threadPoolName , String threadNamePrefix ) {
2174+ public RLMScheduledThreadPool (int poolSize , String threadPoolName , String threadNamePattern ) {
21752175 this .threadPoolName = threadPoolName ;
2176- this .threadNamePrefix = threadNamePrefix ;
2176+ this .threadNamePattern = threadNamePattern ;
21772177 scheduledThreadPool = createPool (poolSize );
21782178 }
21792179
@@ -2190,7 +2190,7 @@ private ScheduledThreadPoolExecutor createPool(int poolSize) {
21902190 threadPool .setRemoveOnCancelPolicy (true );
21912191 threadPool .setExecuteExistingDelayedTasksAfterShutdownPolicy (false );
21922192 threadPool .setContinueExistingPeriodicTasksAfterShutdownPolicy (false );
2193- threadPool .setThreadFactory (ThreadUtils .createThreadFactory (threadNamePrefix , true ));
2193+ threadPool .setThreadFactory (ThreadUtils .createThreadFactory (threadNamePattern , true ));
21942194 return threadPool ;
21952195 }
21962196
0 commit comments