Author: suresh
Date: Fri May 24 19:24:25 2013
New Revision: 1486179
URL: http://svn.apache.org/r1486179
Log:
HADOOP-9490. Merge r1476609 from trunk
Modified:
hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt
hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalFileSystem.java
Modified:
hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1486179&r1=1486178&r2=1486179&view=diff
==============================================================================
---
hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt
(original)
+++
hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt
Fri May 24 19:24:25 2013
@@ -338,6 +338,9 @@ Release 2.0.5-beta - UNRELEASED
HADOOP-9500. TestUserGroupInformation#testGetServerSideGroups fails on
Windows due to failure to find winutils.exe. (Chris Nauroth via suresh)
+
+ HADOOP-9490. LocalFileSystem#reportChecksumFailure not closing the
+ checksum file handle before rename. (Ivan Mitic via suresh)
Release 2.0.4-beta - UNRELEASED
Modified:
hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalFileSystem.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalFileSystem.java?rev=1486179&r1=1486178&r2=1486179&view=diff
==============================================================================
---
hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalFileSystem.java
(original)
+++
hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalFileSystem.java
Fri May 24 19:24:25 2013
@@ -130,6 +130,8 @@ public class LocalFileSystem extends Che
}
// move checksum file too
File checkFile = ((RawLocalFileSystem)fs).pathToFile(getChecksumFile(p));
+ // close the stream before rename to release the file handle
+ sums.close();
b = checkFile.renameTo(new File(badDir, checkFile.getName()+suffix));
if (!b) {
LOG.warn("Ignoring failure of renameTo");