HDFS-3664. BlockManager race when stopping active services. Contributed by Colin Patrick McCabe
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1383753 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
229a79bbc3
commit
414abe6918
@ -754,6 +754,9 @@ Release 2.0.2-alpha - 2012-09-07
|
||||
|
||||
HDFS-2757. Cannot read a local block that's being written to when
|
||||
using the local read short circuit. (Jean-Daniel Cryans via eli)
|
||||
|
||||
HDFS-3664. BlockManager race when stopping active services.
|
||||
(Colin Patrick McCabe via eli)
|
||||
|
||||
BREAKDOWN OF HDFS-3042 SUBTASKS
|
||||
|
||||
|
@ -363,11 +363,10 @@ public void close() {
|
||||
replicationThread.join(3000);
|
||||
}
|
||||
} catch (InterruptedException ie) {
|
||||
} finally {
|
||||
if (pendingReplications != null) pendingReplications.stop();
|
||||
blocksMap.close();
|
||||
datanodeManager.close();
|
||||
}
|
||||
datanodeManager.close();
|
||||
pendingReplications.stop();
|
||||
blocksMap.close();
|
||||
}
|
||||
|
||||
/** @return the datanodeManager */
|
||||
|
@ -192,7 +192,13 @@ void activate(final Configuration conf) {
|
||||
}
|
||||
|
||||
void close() {
|
||||
if (decommissionthread != null) decommissionthread.interrupt();
|
||||
if (decommissionthread != null) {
|
||||
decommissionthread.interrupt();
|
||||
try {
|
||||
decommissionthread.join(3000);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
heartbeatManager.close();
|
||||
}
|
||||
|
||||
|
@ -74,6 +74,11 @@ void activate(Configuration conf) {
|
||||
|
||||
void close() {
|
||||
heartbeatThread.interrupt();
|
||||
try {
|
||||
// This will no effect if the thread hasn't yet been started.
|
||||
heartbeatThread.join(3000);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
|
||||
synchronized int getLiveDatanodeCount() {
|
||||
|
Loading…
Reference in New Issue
Block a user