HDFS-3505. DirectoryScanner does not join all threads in shutdown. Contributed Colin Patrick McCabe
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1347122 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bad1c8bdd5
commit
f159bd401a
|
@ -156,6 +156,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