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

[hbase] branch master updated: Revert "HBASE-22930 Set unique name to longCompactions/shortCompactions threads (#548)"

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

stack pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new 0d338a1  Revert "HBASE-22930 Set unique name to longCompactions/shortCompactions threads (#548)"
0d338a1 is described below

commit 0d338a1820d93382a936061b91f87476e18f9812
Author: stack <st...@apache.org>
AuthorDate: Wed Sep 4 09:18:28 2019 -0700

    Revert "HBASE-22930 Set unique name to longCompactions/shortCompactions threads (#548)"
    
    This reverts commit 0f0a3a22733cdef8a65fb707294a8d36ed0b591d.
---
 .../hadoop/hbase/regionserver/CompactSplit.java    | 23 ++++++++++------------
 1 file changed, 10 insertions(+), 13 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 86beabc..4767284 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
@@ -136,22 +136,19 @@ public class CompactSplit implements CompactionRequester, PropagatingConfigurati
     Preconditions.checkArgument(largeThreads > 0 && smallThreads > 0);
 
     final String n = Thread.currentThread().getName();
-    StealJobQueue<Runnable> stealJobQueue = new StealJobQueue<Runnable>(COMPARATOR);
 
-    AtomicInteger longCompactionThreadCounter = new AtomicInteger(0);
-    this.longCompactions =
-        new ThreadPoolExecutor(largeThreads, largeThreads, 60, TimeUnit.SECONDS, stealJobQueue,
-            new ThreadFactoryBuilder().setNameFormat(n + "-longCompactions-"
-                + longCompactionThreadCounter.getAndIncrement() + "-" + System.currentTimeMillis())
-                .setDaemon(true).build());
+    StealJobQueue<Runnable> stealJobQueue = new StealJobQueue<Runnable>(COMPARATOR);
+    this.longCompactions = new ThreadPoolExecutor(largeThreads, largeThreads, 60,
+        TimeUnit.SECONDS, stealJobQueue,
+        new ThreadFactoryBuilder()
+            .setNameFormat(n + "-longCompactions-" + System.currentTimeMillis())
+            .setDaemon(true).build());
     this.longCompactions.setRejectedExecutionHandler(new Rejection());
     this.longCompactions.prestartAllCoreThreads();
-
-    AtomicInteger shortCompactionThreadCounter = new AtomicInteger(0);
-    this.shortCompactions = new ThreadPoolExecutor(smallThreads, smallThreads, 60, TimeUnit.SECONDS,
-        stealJobQueue.getStealFromQueue(),
-        new ThreadFactoryBuilder().setNameFormat(n + "-shortCompactions-"
-            + shortCompactionThreadCounter.getAndIncrement() + "-" + System.currentTimeMillis())
+    this.shortCompactions = new ThreadPoolExecutor(smallThreads, smallThreads, 60,
+        TimeUnit.SECONDS, stealJobQueue.getStealFromQueue(),
+        new ThreadFactoryBuilder()
+            .setNameFormat(n + "-shortCompactions-" + System.currentTimeMillis())
             .setDaemon(true).build());
     this.shortCompactions.setRejectedExecutionHandler(new Rejection());
   }