HBASE-20699 QuotaCache should cancel the QuotaRefresherChore service inside its 
stop()

Signed-off-by: tedyu <[email protected]>


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

Branch: refs/heads/HBASE-20331
Commit: 30a052b3e5a8611841229198a64e41d74b6a3963
Parents: cfeb26d
Author: Nihal Jain <[email protected]>
Authored: Thu Jun 7 18:42:15 2018 +0530
Committer: tedyu <[email protected]>
Committed: Fri Jun 8 04:30:52 2018 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/quotas/QuotaCache.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/30a052b3/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaCache.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaCache.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaCache.java
index 927816a..0664cc5 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaCache.java
@@ -90,6 +90,10 @@ public class QuotaCache implements Stoppable {
 
   @Override
   public void stop(final String why) {
+    if (refreshChore != null) {
+      LOG.debug("Stopping QuotaRefresherChore chore.");
+      refreshChore.cancel(true);
+    }
     stopped = true;
   }
 

Reply via email to