Author: suresh Date: Mon Jun 10 17:52:31 2013 New Revision: 1491541 URL: http://svn.apache.org/r1491541 Log: HDFS-4880. Merge r1490758 from branch-1
Modified: hadoop/common/branches/branch-1.2/CHANGES.txt hadoop/common/branches/branch-1.2/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java hadoop/common/branches/branch-1.2/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java Modified: hadoop/common/branches/branch-1.2/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1.2/CHANGES.txt?rev=1491541&r1=1491540&r2=1491541&view=diff ============================================================================== --- hadoop/common/branches/branch-1.2/CHANGES.txt (original) +++ hadoop/common/branches/branch-1.2/CHANGES.txt Mon Jun 10 17:52:31 2013 @@ -8,6 +8,9 @@ Release 1.2.1 - Unreleased IMPROVEMENTS + HDFS-4880. Print the image and edits file loaded by the namenode in the + logs. (Arpit Agarwal via suresh) + BUG FIXES MAPREDUCE-5206. Ensure that a job doesn't get added to RetiredJobs Modified: hadoop/common/branches/branch-1.2/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1.2/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java?rev=1491541&r1=1491540&r2=1491541&view=diff ============================================================================== --- hadoop/common/branches/branch-1.2/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java (original) +++ hadoop/common/branches/branch-1.2/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java Mon Jun 10 17:52:31 2013 @@ -637,6 +637,8 @@ public class FSEditLog { long highestGenStamp = -1; long startTime = FSNamesystem.now(); + LOG.info("Start loading edits file " + edits.getName()); + // // Keep track of the file offsets of the last several opcodes. // This is handy when manually recovering corrupted edits files. PositionTrackingInputStream tracker = Modified: hadoop/common/branches/branch-1.2/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1.2/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java?rev=1491541&r1=1491540&r2=1491541&view=diff ============================================================================== --- hadoop/common/branches/branch-1.2/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java (original) +++ hadoop/common/branches/branch-1.2/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java Mon Jun 10 17:52:31 2013 @@ -823,14 +823,17 @@ public class FSImage extends Storage { needToSave |= recoverInterruptedCheckpoint(latestNameSD, latestEditsSD); long startTime = FSNamesystem.now(); - long imageSize = getImageFile(latestNameSD, NameNodeFile.IMAGE).length(); + File imageFile = getImageFile(latestNameSD, NameNodeFile.IMAGE); + long imageSize = imageFile.length(); // // Load in bits // latestNameSD.read(); - needToSave |= loadFSImage(getImageFile(latestNameSD, NameNodeFile.IMAGE)); - LOG.info("Image file of size " + imageSize + " loaded in " + LOG.info("Start loading image file " + imageFile.getPath().toString()); + needToSave |= loadFSImage(imageFile); + LOG.info("Image file " + imageFile.getPath().toString() + + " of size " + imageSize + " bytes loaded in " + (FSNamesystem.now() - startTime)/1000 + " seconds."); // Load latest edits @@ -1067,8 +1070,9 @@ public class FSImage extends Storage { out.close(); } - LOG.info("Image file of size " + newFile.length() + " saved in " - + (FSNamesystem.now() - startTime)/1000 + " seconds."); + LOG.info("Image file " + newFile + " of size " + newFile.length() + + " bytes saved in " + (FSNamesystem.now() - startTime)/1000 + + " seconds."); } /**