HDFS-3048. Small race in BlockManager#close. Contributed by Andy Isaacson
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1373664 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b05c70bd96
commit
f75deca0f9
|
@ -614,6 +614,8 @@ Branch-2 ( Unreleased changes )
|
|||
header when offset is specified and length is omitted.
|
||||
(Ravi Prakash via szetszwo)
|
||||
|
||||
HDFS-3048. Small race in BlockManager#close. (Andy Isaacson via eli)
|
||||
|
||||
BREAKDOWN OF HDFS-3042 SUBTASKS
|
||||
|
||||
HDFS-2185. HDFS portion of ZK-based FailoverController (todd)
|
||||
|
|
|
@ -373,10 +373,17 @@ public class BlockManager {
|
|||
}
|
||||
|
||||
public void close() {
|
||||
try {
|
||||
if (replicationThread != null) {
|
||||
replicationThread.interrupt();
|
||||
replicationThread.join(3000);
|
||||
}
|
||||
} catch (InterruptedException ie) {
|
||||
} finally {
|
||||
if (pendingReplications != null) pendingReplications.stop();
|
||||
blocksMap.close();
|
||||
datanodeManager.close();
|
||||
if (replicationThread != null) replicationThread.interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
/** @return the datanodeManager */
|
||||
|
|
Loading…
Reference in New Issue