HBASE-19822 Override cancel(boolean) in LogCleaner (Addendum)

Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
Reid Chan 2018-01-19 10:49:28 +08:00 committed by Michael Stack
parent fa66c7e28e
commit 298dc0c626
1 changed files with 8 additions and 0 deletions

View File

@ -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;