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:14:17 UTC

[hbase] branch branch-1 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-1
in repository https://gitbox.apache.org/repos/asf/hbase.git


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

commit 9b10afde93ac1e8b4023e50ac69ecac8ddef6951
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    | 5 ++++-
 1 file changed, 4 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 95e9749..8663503 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
@@ -20,6 +20,8 @@
 package org.apache.hadoop.hbase.util;
 
 import com.google.common.annotations.VisibleForTesting;
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
@@ -72,7 +74,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) {