HBASE-23364 HRegionServer sometimes does not shut down.

This commit is contained in:
Lars Hofhansl 2019-12-05 18:14:48 -08:00
parent ec55c2a5d9
commit 9b10afde93
1 changed files with 4 additions and 1 deletions

View File

@ -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) {