Skip to content

Commit

Permalink
HBASE-23364 HRegionServer sometimes does not shut down.
Browse files Browse the repository at this point in the history
  • Loading branch information
lhofhansl committed Dec 6, 2019
1 parent 6d251ef commit 9c82a65
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
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
Expand Down Expand Up @@ -75,7 +76,8 @@ public LossyCounting(double errorRate, String name, LossyCountingListener listen
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) {
Expand Down

0 comments on commit 9c82a65

Please sign in to comment.