فهرست منبع

HADOOP-9490. Merge r1476609 from trunk

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1486179 13f79535-47bb-0310-9956-ffa450edef68
Suresh Srinivas 12 سال پیش
والد
کامیت
e0c878b493

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -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
 

+ 2 - 0
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalFileSystem.java

@@ -130,6 +130,8 @@ public class LocalFileSystem extends ChecksumFileSystem {
       }
       // 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");