hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject svn commit: r1165944 - in /hadoop/common/branches/branch-0.22/hdfs: CHANGES.txt src/java/org/apache/hadoop/hdfs/server/namenode/BackupStorage.java
Date Wed, 07 Sep 2011 00:42:38 GMT
Author: shv
Date: Wed Sep  7 00:42:38 2011
New Revision: 1165944

URL: http://svn.apache.org/viewvc?rev=1165944&view=rev
Log:
HDFS-2280. BackupNode fails with MD5 checksum Exception. Contributed by Konstantin Shvachko.

Modified:
    hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt
    hadoop/common/branches/branch-0.22/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/BackupStorage.java

Modified: hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt?rev=1165944&r1=1165943&r2=1165944&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt Wed Sep  7 00:42:38 2011
@@ -619,6 +619,8 @@ Release 0.22.0 - Unreleased
     HDFS-2281. NPE in checkpoint during processIOError().
     (Uma Maheswara Rao G via shv)
 
+    HDFS-2280. BackupNode fails with MD5 checksum Exception. (shv)
+
 Release 0.21.1 - Unreleased
 
   IMPROVEMENTS

Modified: hadoop/common/branches/branch-0.22/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/BackupStorage.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/BackupStorage.java?rev=1165944&r1=1165943&r2=1165944&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/BackupStorage.java
(original)
+++ hadoop/common/branches/branch-0.22/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/BackupStorage.java
Wed Sep  7 00:42:38 2011
@@ -133,6 +133,7 @@ public class BackupStorage extends FSIma
       // rename current to lastcheckpoint.tmp
       moveCurrent(sd);
     }
+    this.imageDigest = null;
   }
 
   /**
@@ -156,6 +157,8 @@ public class BackupStorage extends FSIma
       StorageDirectory sdEdits = itEdits.next();
       getFSDirectoryRootLock().writeLock();
       try { // load image under rootDir lock
+        // make sure image checksum is verified against the expected value
+        imageDigest = sig.imageDigest; 
         loadFSImage(FSImage.getImageFile(sdName, NameNodeFile.IMAGE));
       } finally {
         getFSDirectoryRootLock().writeUnlock();



Mime
View raw message