hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject hbase git commit: HBASE-17006 Give name to existing threads. Having thread names in logs and thread dumps greatly improve debugability. This patch is simply adding the names to the threads we spawn.
Date Fri, 04 Nov 2016 01:28:48 GMT
Repository: hbase
Updated Branches:
  refs/heads/master f61ae6f06 -> bb0fc6b60


HBASE-17006 Give name to existing threads.
Having thread names in logs and thread dumps greatly improve debugability. This patch is simply
adding the names to the threads we spawn.

Change-Id: I6ff22cc3804bb81147dde3a8e9ab671633c6f6ce


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/bb0fc6b6
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/bb0fc6b6
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/bb0fc6b6

Branch: refs/heads/master
Commit: bb0fc6b602a62045e9b4eb9b617a322b9cf7380f
Parents: f61ae6f
Author: Apekshit Sharma <appy@apache.org>
Authored: Wed Nov 2 15:59:07 2016 -0700
Committer: Apekshit Sharma <appy@apache.org>
Committed: Thu Nov 3 18:28:19 2016 -0700

----------------------------------------------------------------------
 .../chaos/monkies/PolicyBasedChaosMonkey.java   |  2 +-
 .../org/apache/hadoop/hbase/fs/HFileSystem.java |  2 +-
 .../hadoop/hbase/io/hfile/PrefetchExecutor.java |  4 ++--
 .../hbase/io/hfile/bucket/BucketCache.java      |  1 +
 .../org/apache/hadoop/hbase/master/HMaster.java |  3 ++-
 .../hbase/master/MasterMobCompactionThread.java |  5 ++---
 .../hbase/regionserver/CompactSplitThread.java  | 20 ++++++++------------
 .../hbase/regionserver/HRegionServer.java       |  9 ++-------
 .../hadoop/hbase/regionserver/Leases.java       |  1 +
 .../hadoop/hbase/regionserver/LogRoller.java    |  2 +-
 .../regionserver/RegionServicesForStores.java   |  8 +++-----
 .../hadoop/hbase/regionserver/ShutdownHook.java |  3 ++-
 .../org/apache/hadoop/hbase/tool/Canary.java    |  2 +-
 .../hadoop/hbase/util/JvmPauseMonitor.java      |  3 +--
 .../hadoop/hbase/util/ModifyRegionUtils.java    |  3 +--
 .../hbase/PerformanceEvaluationCommons.java     |  4 +---
 .../hadoop/hbase/util/MultiThreadedAction.java  |  3 ++-
 .../hbase/util/MultiThreadedWriterBase.java     |  3 ++-
 18 files changed, 34 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/monkies/PolicyBasedChaosMonkey.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/monkies/PolicyBasedChaosMonkey.java
b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/monkies/PolicyBasedChaosMonkey.java
index 9152cb2..57f7c83 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/monkies/PolicyBasedChaosMonkey.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/monkies/PolicyBasedChaosMonkey.java
@@ -113,7 +113,7 @@ public class PolicyBasedChaosMonkey extends ChaosMonkey {
 
     for (int i=0; i<policies.length; i++) {
       policies[i].init(new Policy.PolicyContext(this.util));
-      Thread monkeyThread = new Thread(policies[i]);
+      Thread monkeyThread = new Thread(policies[i], "ChaosMonkeyThread");
       monkeyThread.start();
       monkeyThreads[i] = monkeyThread;
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java
index b4f1953..16e8a35 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java
@@ -273,7 +273,7 @@ public class HFileSystem extends FilterFileSystem {
       ClientProtocol cp1 = createReorderingProxy(namenode, lrb, conf);
       nf.set(dfsc, cp1);
       LOG.info("Added intercepting call to namenode#getBlockLocations so can do block reordering"
+
-        " using class " + lrb.getClass());
+        " using class " + lrb.getClass().getName());
     } catch (NoSuchFieldException e) {
       LOG.warn("Can't modify the DFSClient#namenode field to add the location reorder.",
e);
       return false;

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/PrefetchExecutor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/PrefetchExecutor.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/PrefetchExecutor.java
index f1ab4c4..61deef5 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/PrefetchExecutor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/PrefetchExecutor.java
@@ -63,8 +63,8 @@ public class PrefetchExecutor {
       new ThreadFactory() {
         @Override
         public Thread newThread(Runnable r) {
-          Thread t = new Thread(r);
-          t.setName("hfile-prefetch-" + System.currentTimeMillis());
+          String name = "hfile-prefetch-" + System.currentTimeMillis();
+          Thread t = new Thread(r, name);
           t.setDaemon(true);
           return t;
         }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
index ec7a71f..a36423e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
@@ -784,6 +784,7 @@ public class BucketCache implements BlockCache, HeapSize {
     private volatile boolean writerEnabled = true;
 
     WriterThread(BlockingQueue<RAMQueueEntry> queue) {
+      super("BucketCacheWriterThread");
       this.inputQueue = queue;
     }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
index 4171872..64caea9 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
@@ -666,7 +666,8 @@ public class HMaster extends HRegionServer implements MasterServices {
       throws IOException, InterruptedException, KeeperException, CoordinatedStateException
{
 
     isActiveMaster = true;
-    Thread zombieDetector = new Thread(new InitializationMonitor(this));
+    Thread zombieDetector = new Thread(new InitializationMonitor(this),
+        "ActiveMasterInitializationMonitor-" + System.currentTimeMillis());
     zombieDetector.start();
 
     /*

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterMobCompactionThread.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterMobCompactionThread.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterMobCompactionThread.java
index f8a5c15..47f52f5 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterMobCompactionThread.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterMobCompactionThread.java
@@ -57,9 +57,8 @@ public class MasterMobCompactionThread {
       new SynchronousQueue<Runnable>(), new ThreadFactory() {
         @Override
         public Thread newThread(Runnable r) {
-          Thread t = new Thread(r);
-          t.setName(n + "-MasterMobCompaction-" + EnvironmentEdgeManager.currentTime());
-          return t;
+          String name = n + "-MasterMobCompaction-" + EnvironmentEdgeManager.currentTime();
+          return new Thread(r, name);
         }
       });
     ((ThreadPoolExecutor) this.masterMobPool).allowCoreThreadTimeOut(true);

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
index a454f0e..1331b86 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
@@ -124,9 +124,8 @@ public class CompactSplitThread implements CompactionRequestor, PropagatingConfi
         new ThreadFactory() {
           @Override
           public Thread newThread(Runnable r) {
-            Thread t = new Thread(r);
-            t.setName(n + "-longCompactions-" + System.currentTimeMillis());
-            return t;
+            String name = n + "-longCompactions-" + System.currentTimeMillis();
+            return new Thread(r, name);
           }
       });
     this.longCompactions.setRejectedExecutionHandler(new Rejection());
@@ -136,9 +135,8 @@ public class CompactSplitThread implements CompactionRequestor, PropagatingConfi
         new ThreadFactory() {
           @Override
           public Thread newThread(Runnable r) {
-            Thread t = new Thread(r);
-            t.setName(n + "-shortCompactions-" + System.currentTimeMillis());
-            return t;
+            String name = n + "-shortCompactions-" + System.currentTimeMillis();
+            return new Thread(r, name);
           }
       });
     this.shortCompactions
@@ -148,9 +146,8 @@ public class CompactSplitThread implements CompactionRequestor, PropagatingConfi
             new ThreadFactory() {
           @Override
           public Thread newThread(Runnable r) {
-            Thread t = new Thread(r);
-            t.setName(n + "-splits-" + System.currentTimeMillis());
-            return t;
+            String name = n + "-splits-" + System.currentTimeMillis();
+            return new Thread(r, name);
           }
       });
     int mergeThreads = conf.getInt(MERGE_THREADS, MERGE_THREADS_DEFAULT);
@@ -158,9 +155,8 @@ public class CompactSplitThread implements CompactionRequestor, PropagatingConfi
         mergeThreads, new ThreadFactory() {
           @Override
           public Thread newThread(Runnable r) {
-            Thread t = new Thread(r);
-            t.setName(n + "-merges-" + System.currentTimeMillis());
-            return t;
+            String name = n + "-merges-" + System.currentTimeMillis();
+            return new Thread(r, name);
           }
         });
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
index 73dc265..ace099b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
@@ -504,9 +504,6 @@ public class HRegionServer extends HasThread implements
 
   /**
    * Starts a HRegionServer at the default location.
-   * @param conf
-   * @throws IOException
-   * @throws InterruptedException
    */
   public HRegionServer(Configuration conf) throws IOException, InterruptedException {
     this(conf, CoordinatedStateManagerFactory.getCoordinatedStateManager(conf));
@@ -514,12 +511,10 @@ public class HRegionServer extends HasThread implements
 
   /**
    * Starts a HRegionServer at the default location
-   * @param conf
    * @param csm implementation of CoordinatedStateManager to be used
-   * @throws IOException
    */
-  public HRegionServer(Configuration conf, CoordinatedStateManager csm)
-      throws IOException {
+  public HRegionServer(Configuration conf, CoordinatedStateManager csm) throws IOException
{
+    super("RegionServer");  // thread name
     this.fsOk = true;
     this.conf = conf;
     HFile.checkHFileVersion(this.conf);

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Leases.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Leases.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Leases.java
index 1373e27..4af703c 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Leases.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Leases.java
@@ -68,6 +68,7 @@ public class Leases extends HasThread {
    *          (milliseconds)
    */
   public Leases(final int leaseCheckFrequency) {
+    super("RegionServerLeases");  // thread name
     this.leaseCheckFrequency = leaseCheckFrequency;
     setDaemon(true);
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LogRoller.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LogRoller.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LogRoller.java
index fa217ee..9a2bb34 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LogRoller.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LogRoller.java
@@ -90,7 +90,7 @@ public class LogRoller extends HasThread {
 
   /** @param server */
   public LogRoller(final Server server, final RegionServerServices services) {
-    super();
+    super("LogRoller");
     this.server = server;
     this.services = services;
     this.rollperiod = this.server.getConfiguration().

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServicesForStores.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServicesForStores.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServicesForStores.java
index c7f2ce6..82e6778 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServicesForStores.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServicesForStores.java
@@ -44,11 +44,9 @@ public class RegionServicesForStores {
           new ThreadFactory() {
             @Override
             public Thread newThread(Runnable r) {
-              Thread t = new Thread(r);
-              t.setName(Thread.currentThread().getName()
-                  + "-inmemoryCompactions-"
-                  + System.currentTimeMillis());
-              return t;
+              String name = Thread.currentThread().getName() + "-inmemoryCompactions-" +
+                  System.currentTimeMillis();
+              return new Thread(r, name);
             }
           });
   private final HRegion region;

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ShutdownHook.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ShutdownHook.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ShutdownHook.java
index 83e4ea8..f19f26f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ShutdownHook.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ShutdownHook.java
@@ -119,7 +119,8 @@ public class ShutdownHook {
             if (refs == 1) {
               LOG.info("Starting fs shutdown hook thread.");
               Thread fsShutdownHookThread = (fsShutdownHook instanceof Thread) ?
-                (Thread)fsShutdownHook : new Thread(fsShutdownHook);
+                (Thread)fsShutdownHook : new Thread(fsShutdownHook,
+                  fsShutdownHook.getClass().getSimpleName() + "-shutdown-hook");
               fsShutdownHookThread.start();
               Threads.shutdown(fsShutdownHookThread,
               this.conf.getLong(FS_SHUTDOWN_HOOK_WAIT, 30000));

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
index 10bc139..6c4befc 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
@@ -720,7 +720,7 @@ public final class Canary implements Tool {
         // Do monitor !!
         try {
           monitor = this.newMonitor(connection, index, args);
-          monitorThread = new Thread(monitor);
+          monitorThread = new Thread(monitor, "CanaryMonitor-" + System.currentTimeMillis());
           startTime = System.currentTimeMillis();
           monitorThread.start();
           while (!monitor.isDone()) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/main/java/org/apache/hadoop/hbase/util/JvmPauseMonitor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/JvmPauseMonitor.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/JvmPauseMonitor.java
index 436f04a..9288a45 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/JvmPauseMonitor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/JvmPauseMonitor.java
@@ -83,9 +83,8 @@ public class JvmPauseMonitor {
   
   public void start() {
     Preconditions.checkState(monitorThread == null, "Already started");
-    monitorThread = new Thread(new Monitor());
+    monitorThread = new Thread(new Monitor(), "JvmPauseMonitor");
     monitorThread.setDaemon(true);
-    monitorThread.setName("JvmPauseMonitor");
     monitorThread.start();
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ModifyRegionUtils.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ModifyRegionUtils.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ModifyRegionUtils.java
index a936fc2..f11d38b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ModifyRegionUtils.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ModifyRegionUtils.java
@@ -233,8 +233,7 @@ public abstract class ModifyRegionUtils {
 
           @Override
           public Thread newThread(Runnable r) {
-            Thread t = new Thread(r, threadNamePrefix + "-" + count++);
-            return t;
+            return new Thread(r, threadNamePrefix + "-" + count++);
           }
         });
     return regionOpenAndInitThreadPool;

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluationCommons.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluationCommons.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluationCommons.java
index 3270c1c..3809a13 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluationCommons.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluationCommons.java
@@ -69,9 +69,7 @@ public class PerformanceEvaluationCommons {
     long now = System.currentTimeMillis();
     List<Thread> threads = new ArrayList<Thread>(count);
     for (int i = 0; i < count; i++) {
-      Thread t = new Thread(r);
-      t.setName("" + i);
-      threads.add(t);
+      threads.add(new Thread(r, "concurrentRead-" + i));
     }
     for (Thread t: threads) {
       t.start();

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
index 7001441..db42659 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
@@ -158,7 +158,8 @@ public abstract class MultiThreadedAction {
     this.startKey = startKey;
     this.endKey = endKey;
     this.numThreads = numThreads;
-    (new Thread(new ProgressReporter(actionLetter))).start();
+    (new Thread(new ProgressReporter(actionLetter),
+        "MultiThreadedAction-ProgressReporter-" + System.currentTimeMillis())).start();
   }
 
   private static String formatTime(long elapsedTime) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/bb0fc6b6/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedWriterBase.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedWriterBase.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedWriterBase.java
index d4e6d80..1bbd410 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedWriterBase.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedWriterBase.java
@@ -89,7 +89,8 @@ public abstract class MultiThreadedWriterBase extends MultiThreadedAction
{
     wroteUpToKey.set(startKey - 1);
 
     if (trackWroteKeys) {
-      new Thread(new WroteKeysTracker()).start();
+      new Thread(new WroteKeysTracker(),
+          "MultiThreadedWriterBase-WroteKeysTracker-" + System.currentTimeMillis()).start();
       numThreadsWorking.incrementAndGet();
     }
   }


Mime
View raw message