You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by la...@apache.org on 2019/12/06 02:24:37 UTC

[hbase] branch branch-2 updated: HBASE-23364 HRegionServer sometimes does not shut down.

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

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


The following commit(s) were added to refs/heads/branch-2 by this push:
     new 5afaff6  HBASE-23364 HRegionServer sometimes does not shut down.
5afaff6 is described below

commit 5afaff66dc9afc9302c2e434bbf929659d85410a
Author: Lars Hofhansl <la...@apache.org>
AuthorDate: Thu Dec 5 18:14:48 2019 -0800

    HBASE-23364 HRegionServer sometimes does not shut down.
---
 .../src/main/java/org/apache/hadoop/hbase/util/LossyCounting.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/LossyCounting.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/LossyCounting.java
index d730a01..be9bf42 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/LossyCounting.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/LossyCounting.java
@@ -34,6 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
+import org.apache.hbase.thirdparty.com.google.common.util.concurrent.ThreadFactoryBuilder;
 
 /**
  * LossyCounting utility, bounded data structure that maintains approximate high frequency
@@ -75,7 +76,8 @@ public class LossyCounting<T> {
     this.data = new ConcurrentHashMap<>();
     this.listener = listener;
     calculateCurrentTerm();
-    executor = Executors.newSingleThreadExecutor();
+    executor = Executors.newSingleThreadExecutor(
+      new ThreadFactoryBuilder().setDaemon(true).setNameFormat("lossy-count-%d").build());
   }
 
   public LossyCounting(String name, LossyCountingListener listener) {