You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ps...@apache.org on 2019/09/22 11:18:54 UTC

[hbase] branch branch-2.1 updated: HBASE-22930 Set unique name to longCompactions/shortCompactions/split threads (#585)

This is an automated email from the ASF dual-hosted git repository.

psomogyi pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 20e0289  HBASE-22930 Set unique name to longCompactions/shortCompactions/split threads (#585)
20e0289 is described below

commit 20e0289fe5b72a80af4cedca3651a4722028e50c
Author: Pankaj <pa...@huawei.com>
AuthorDate: Sun Sep 22 15:55:02 2019 +0530

    HBASE-22930 Set unique name to longCompactions/shortCompactions/split threads (#585)
---
 .../apache/hadoop/hbase/regionserver/CompactSplit.java  | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java
index 46b24d0..1f265d5 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java
@@ -121,22 +121,17 @@ public class CompactSplit implements CompactionRequester, PropagatingConfigurati
     final String n = Thread.currentThread().getName();
 
     StealJobQueue<Runnable> stealJobQueue = new StealJobQueue<Runnable>(COMPARATOR);
-    this.longCompactions = new ThreadPoolExecutor(largeThreads, largeThreads, 60,
-        TimeUnit.SECONDS, stealJobQueue,
-        new ThreadFactoryBuilder()
-            .setNameFormat(n + "-longCompactions-" + System.currentTimeMillis())
+    this.longCompactions = new ThreadPoolExecutor(largeThreads, largeThreads, 60, TimeUnit.SECONDS,
+        stealJobQueue, new ThreadFactoryBuilder().setNameFormat(n + "-longCompactions-%d")
             .setDaemon(true).build());
     this.longCompactions.setRejectedExecutionHandler(new Rejection());
     this.longCompactions.prestartAllCoreThreads();
-    this.shortCompactions = new ThreadPoolExecutor(smallThreads, smallThreads, 60,
-        TimeUnit.SECONDS, stealJobQueue.getStealFromQueue(),
-        new ThreadFactoryBuilder()
-            .setNameFormat(n + "-shortCompactions-" + System.currentTimeMillis())
-            .setDaemon(true).build());
+    this.shortCompactions = new ThreadPoolExecutor(smallThreads, smallThreads, 60, TimeUnit.SECONDS,
+        stealJobQueue.getStealFromQueue(), new ThreadFactoryBuilder()
+            .setNameFormat(n + "-shortCompactions-%d").setDaemon(true).build());
     this.shortCompactions.setRejectedExecutionHandler(new Rejection());
     this.splits = (ThreadPoolExecutor) Executors.newFixedThreadPool(splitThreads,
-        new ThreadFactoryBuilder().setNameFormat(n + "-splits-" + System.currentTimeMillis())
-            .setDaemon(true).build());
+        new ThreadFactoryBuilder().setNameFormat(n + "-splits-%d").setDaemon(true).build());
 
     // compaction throughput controller
     this.compactionThroughputController =