hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [2/3] hbase git commit: HBASE-19822 Override cancel(boolean) in LogCleaner (Addendum)
Date Fri, 19 Jan 2018 19:47:40 GMT
HBASE-19822 Override cancel(boolean) in LogCleaner (Addendum)

Signed-off-by: Michael Stack <stack@apache.org>


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

Branch: refs/heads/master
Commit: 298dc0c626e3844d9a1551cc3e293f518277e89c
Parents: fa66c7e
Author: Reid Chan <reidddchan@outlook.com>
Authored: Fri Jan 19 10:49:28 2018 +0800
Committer: Michael Stack <stack@apache.org>
Committed: Fri Jan 19 11:46:46 2018 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/master/cleaner/LogCleaner.java   | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/298dc0c6/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/LogCleaner.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/LogCleaner.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/LogCleaner.java
index 6e5424f..db364ee 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/LogCleaner.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/LogCleaner.java
@@ -177,6 +177,14 @@ public class LogCleaner extends CleanerChore<BaseLogCleanerDelegate>
{
     }
   }
 
+  @Override
+  public synchronized void cancel(boolean mayInterruptIfRunning) {
+    super.cancel(mayInterruptIfRunning);
+    for (Thread t : oldWALsCleaner) {
+      t.interrupt();
+    }
+  }
+
   private static final class CleanerContext {
     // At most waits 60 seconds
     static final long MAX_WAIT = 60 * 1000;


Mime
View raw message