HBASE-19822 HFileCleaner threads stick around after shutdown stuck on queue#take Interrupt wait on queue when cancel is called.
This commit is contained in:
parent
cde1f821eb
commit
8b520ce50d
|
@ -231,7 +231,7 @@ public class HFileCleaner extends CleanerChore<BaseHFileCleanerDelegate> {
|
|||
try {
|
||||
task = queue.take();
|
||||
} catch (InterruptedException e) {
|
||||
LOG.debug("Interrupted while trying to take a task from queue", e);
|
||||
LOG.trace("Interrupted while trying to take a task from queue", e);
|
||||
break;
|
||||
}
|
||||
if (task != null) {
|
||||
|
@ -445,4 +445,12 @@ public class HFileCleaner extends CleanerChore<BaseHFileCleanerDelegate> {
|
|||
}
|
||||
return updated;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void cancel(boolean mayInterruptIfRunning) {
|
||||
super.cancel(mayInterruptIfRunning);
|
||||
for (Thread t: this.threads) {
|
||||
t.interrupt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue