hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r678840 - in /hadoop/core/trunk: CHANGES.txt src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java
Date Tue, 22 Jul 2008 18:15:18 GMT
Author: mahadev
Date: Tue Jul 22 11:15:18 2008
New Revision: 678840

URL: http://svn.apache.org/viewvc?rev=678840&view=rev
Log:
HADOOP-3795. Fix saving image files on Namenode with different checkpoint stamps. (Lohit Vijayarenu
via mahadev)

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=678840&r1=678839&r2=678840&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Tue Jul 22 11:15:18 2008
@@ -153,6 +153,9 @@
     HADOOP-3592. Improve exception handling in IOUtils. (Bill de hOra via
     cdouglas)
 
+    HADOOP-3795. Fix saving image files on Namenode with different checkpoint
+    stamps. (Lohit Vijayarenu via mahadev)
+
 Release 0.18.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java?rev=678840&r1=678839&r2=678840&view=diff
==============================================================================
--- hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java (original)
+++ hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java Tue Jul
22 11:15:18 2008
@@ -654,6 +654,12 @@
       assert getImageFile(sd, NameNodeFile.IMAGE).exists() :
         "Image file must exist.";
       checkpointTime = readCheckpointTime(sd);
+      if ((checkpointTime != Long.MIN_VALUE) && 
+          (checkpointTime != latestCheckpointTime)) {
+        // Force saving of new image if checkpoint time
+        // is not same in all of the storage directories.
+        needToSave |= true;
+      }
       if (latestCheckpointTime < checkpointTime) {
         latestCheckpointTime = checkpointTime;
         latestSD = sd;



Mime
View raw message