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
13547d53eb
commit
a57769a15c
|
@ -231,7 +231,7 @@ public class HFileCleaner extends CleanerChore<BaseHFileCleanerDelegate> {
|
||||||
try {
|
try {
|
||||||
task = queue.take();
|
task = queue.take();
|
||||||
} catch (InterruptedException e) {
|
} 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;
|
break;
|
||||||
}
|
}
|
||||||
if (task != null) {
|
if (task != null) {
|
||||||
|
@ -445,4 +445,12 @@ public class HFileCleaner extends CleanerChore<BaseHFileCleanerDelegate> {
|
||||||
}
|
}
|
||||||
return updated;
|
return updated;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public synchronized void cancel(boolean mayInterruptIfRunning) {
|
||||||
|
super.cancel(mayInterruptIfRunning);
|
||||||
|
for (Thread t: this.threads) {
|
||||||
|
t.interrupt();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue