HDFS-2815. Merging change r1243673 from trunk to 0.23.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1243674 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5fabd5cb6f
commit
87cd58b0f9
|
@ -29,6 +29,9 @@ Release 0.23.2 - UNRELEASED
|
||||||
HDFS-776. Fix exception handling in Balancer. (Uma Maheswara Rao G
|
HDFS-776. Fix exception handling in Balancer. (Uma Maheswara Rao G
|
||||||
via szetszwo)
|
via szetszwo)
|
||||||
|
|
||||||
|
HDFS-2815. Namenode sometimes oes not come out of safemode during
|
||||||
|
NN crash + restart. (Uma Maheswara Rao via suresh)
|
||||||
|
|
||||||
Release 0.23.1 - 2012-02-08
|
Release 0.23.1 - 2012-02-08
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -1908,7 +1908,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
boolean enforcePermission)
|
boolean enforcePermission)
|
||||||
throws AccessControlException, SafeModeException, UnresolvedLinkException,
|
throws AccessControlException, SafeModeException, UnresolvedLinkException,
|
||||||
IOException {
|
IOException {
|
||||||
boolean deleteNow = false;
|
|
||||||
ArrayList<Block> collectedBlocks = new ArrayList<Block>();
|
ArrayList<Block> collectedBlocks = new ArrayList<Block>();
|
||||||
|
|
||||||
writeLock();
|
writeLock();
|
||||||
|
@ -1926,10 +1925,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
if (!dir.delete(src, collectedBlocks)) {
|
if (!dir.delete(src, collectedBlocks)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
deleteNow = collectedBlocks.size() <= BLOCK_DELETION_INCREMENT;
|
|
||||||
if (deleteNow) { // Perform small deletes right away
|
|
||||||
removeBlocks(collectedBlocks);
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
writeUnlock();
|
writeUnlock();
|
||||||
}
|
}
|
||||||
|
@ -1938,9 +1933,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
|
|
||||||
writeLock();
|
writeLock();
|
||||||
try {
|
try {
|
||||||
if (!deleteNow) {
|
removeBlocks(collectedBlocks); // Incremental deletion of blocks
|
||||||
removeBlocks(collectedBlocks); // Incremental deletion of blocks
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
writeUnlock();
|
writeUnlock();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue