HDFS-3505. DirectoryScanner does not join all threads in shutdown. Contributed by Colin Patrick McCabe
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1347117 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8ad1fcb3c3
commit
8813f42175
|
@ -307,6 +307,9 @@ Release 2.0.1-alpha - UNRELEASED
|
||||||
HDFS-3266. DFSTestUtil#waitCorruptReplicas doesn't sleep between checks.
|
HDFS-3266. DFSTestUtil#waitCorruptReplicas doesn't sleep between checks.
|
||||||
(Madhukara Phatak via atm)
|
(Madhukara Phatak via atm)
|
||||||
|
|
||||||
|
HDFS-3505. DirectoryScanner does not join all threads in shutdown.
|
||||||
|
(Colin Patrick McCabe via eli)
|
||||||
|
|
||||||
Release 2.0.0-alpha - 05-23-2012
|
Release 2.0.0-alpha - 05-23-2012
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -302,6 +302,22 @@ public class DirectoryScanner implements Runnable {
|
||||||
shouldRun = false;
|
shouldRun = false;
|
||||||
if (masterThread != null) masterThread.shutdown();
|
if (masterThread != null) masterThread.shutdown();
|
||||||
if (reportCompileThreadPool != null) reportCompileThreadPool.shutdown();
|
if (reportCompileThreadPool != null) reportCompileThreadPool.shutdown();
|
||||||
|
if (masterThread != null) {
|
||||||
|
try {
|
||||||
|
masterThread.awaitTermination(1, TimeUnit.MINUTES);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
LOG.error("interrupted while waiting for masterThread to " +
|
||||||
|
"terminate", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (reportCompileThreadPool != null) {
|
||||||
|
try {
|
||||||
|
reportCompileThreadPool.awaitTermination(1, TimeUnit.MINUTES);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
LOG.error("interrupted while waiting for reportCompileThreadPool to " +
|
||||||
|
"terminate", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!retainDiffs) clear();
|
if (!retainDiffs) clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue