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:
Suresh Srinivas 2012-02-13 20:19:23 +00:00
parent 5fabd5cb6f
commit 87cd58b0f9
2 changed files with 4 additions and 8 deletions

View File

@ -29,6 +29,9 @@ Release 0.23.2 - UNRELEASED
HDFS-776. Fix exception handling in Balancer. (Uma Maheswara Rao G
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
INCOMPATIBLE CHANGES

View File

@ -1908,7 +1908,6 @@ private boolean deleteInternal(String src, boolean recursive,
boolean enforcePermission)
throws AccessControlException, SafeModeException, UnresolvedLinkException,
IOException {
boolean deleteNow = false;
ArrayList<Block> collectedBlocks = new ArrayList<Block>();
writeLock();
@ -1926,10 +1925,6 @@ private boolean deleteInternal(String src, boolean recursive,
if (!dir.delete(src, collectedBlocks)) {
return false;
}
deleteNow = collectedBlocks.size() <= BLOCK_DELETION_INCREMENT;
if (deleteNow) { // Perform small deletes right away
removeBlocks(collectedBlocks);
}
} finally {
writeUnlock();
}
@ -1938,9 +1933,7 @@ private boolean deleteInternal(String src, boolean recursive,
writeLock();
try {
if (!deleteNow) {
removeBlocks(collectedBlocks); // Incremental deletion of blocks
}
removeBlocks(collectedBlocks); // Incremental deletion of blocks
} finally {
writeUnlock();
}