Author: suresh Date: Fri Jun 7 17:35:34 2013 New Revision: 1490746 URL: http://svn.apache.org/r1490746 Log: HDFS-4880. Print the image and edits file loaded by the namenode in the logs. Contributed by Arpit Agarwal.
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogLoader.java hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1490746&r1=1490745&r2=1490746&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Fri Jun 7 17:35:34 2013 @@ -369,6 +369,9 @@ Release 2.1.0-beta - UNRELEASED HDFS-4234. Use generic code for choosing datanode in Balancer. (szetszwo) + HDFS-4880. Print the image and edits file loaded by the namenode in the + logs. (Arpit Agarwal via suresh) + OPTIMIZATIONS BUG FIXES Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogLoader.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogLoader.java?rev=1490746&r1=1490745&r2=1490746&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogLoader.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogLoader.java Fri Jun 7 17:35:34 2013 @@ -94,6 +94,7 @@ public class FSEditLogLoader { fsNamesys.writeLock(); try { long startTime = now(); + FSImage.LOG.info("Start loading edits file " + edits.getName()); long numEdits = loadEditRecords(edits, false, expectedStartingTxId, recovery); FSImage.LOG.info("Edits file " + edits.getName() Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java?rev=1490746&r1=1490745&r2=1490746&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java Fri Jun 7 17:35:34 2013 @@ -325,8 +325,8 @@ public class FSImageFormat { imgDigest = new MD5Hash(digester.digest()); loaded = true; - LOG.info("Image file of size " + curFile.length() + " loaded in " - + (now() - startTime)/1000 + " seconds."); + LOG.info("Image file " + curFile + " of size " + curFile.length() + + " bytes loaded in " + (now() - startTime)/1000 + " seconds."); } /** Update the root node's attributes */ @@ -872,8 +872,8 @@ public class FSImageFormat { // set md5 of the saved image savedDigest = new MD5Hash(digester.digest()); - LOG.info("Image file of size " + newFile.length() + " saved in " - + (now() - startTime)/1000 + " seconds."); + LOG.info("Image file " + newFile + " of size " + newFile.length() + + " bytes saved in " + (now() - startTime)/1000 + " seconds."); } /**