You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/08/05 07:17:18 UTC

[GitHub] [hbase] virajjasani commented on a change in pull request #2196: HBASE-24750 : All ExecutorService should use guava ThreadFactoryBuilder

virajjasani commented on a change in pull request #2196:
URL: https://github.com/apache/hbase/pull/2196#discussion_r465522519



##########
File path: hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/regionserver/LogRollBackupSubprocedurePool.java
##########
@@ -62,10 +62,9 @@ public LogRollBackupSubprocedurePool(String name, Configuration conf) {
           LogRollRegionServerProcedureManager.BACKUP_TIMEOUT_MILLIS_DEFAULT);
     int threads = conf.getInt(CONCURENT_BACKUP_TASKS_KEY, DEFAULT_CONCURRENT_BACKUP_TASKS);
     this.name = name;
-    executor =
-        new ThreadPoolExecutor(1, threads, keepAlive, TimeUnit.SECONDS,
-            new LinkedBlockingQueue<>(),
-            Threads.newDaemonThreadFactory("rs(" + name + ")-backup"));
+    executor = new ThreadPoolExecutor(1, threads, keepAlive, TimeUnit.SECONDS,
+      new LinkedBlockingQueue<>(),
+      new ThreadFactoryBuilder().setNameFormat("rs(" + name + ")-backup-pool-%d").build());

Review comment:
       The reason why I appended `-pool` is to actually adhere with current format only. We add `-pool` in Threads class internally.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org