HDFS-4880. Print the image and edits file loaded by the namenode in the logs. Contributed by Arpit Agarwal.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1490746 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suresh Srinivas 2013-06-07 17:35:34 +00:00
parent a8c330fd33
commit a764da16d6
3 changed files with 8 additions and 4 deletions

View File

@ -369,6 +369,9 @@ Release 2.1.0-beta - UNRELEASED
HDFS-4234. Use generic code for choosing datanode in Balancer. (szetszwo) 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 OPTIMIZATIONS
BUG FIXES BUG FIXES

View File

@ -94,6 +94,7 @@ long loadFSEdits(EditLogInputStream edits, long expectedStartingTxId,
fsNamesys.writeLock(); fsNamesys.writeLock();
try { try {
long startTime = now(); long startTime = now();
FSImage.LOG.info("Start loading edits file " + edits.getName());
long numEdits = loadEditRecords(edits, false, long numEdits = loadEditRecords(edits, false,
expectedStartingTxId, recovery); expectedStartingTxId, recovery);
FSImage.LOG.info("Edits file " + edits.getName() FSImage.LOG.info("Edits file " + edits.getName()

View File

@ -325,8 +325,8 @@ void load(File curFile) throws IOException {
imgDigest = new MD5Hash(digester.digest()); imgDigest = new MD5Hash(digester.digest());
loaded = true; loaded = true;
LOG.info("Image file of size " + curFile.length() + " loaded in " LOG.info("Image file " + curFile + " of size " + curFile.length() +
+ (now() - startTime)/1000 + " seconds."); " bytes loaded in " + (now() - startTime)/1000 + " seconds.");
} }
/** Update the root node's attributes */ /** Update the root node's attributes */
@ -872,8 +872,8 @@ void save(File newFile, FSImageCompression compression) throws IOException {
// set md5 of the saved image // set md5 of the saved image
savedDigest = new MD5Hash(digester.digest()); savedDigest = new MD5Hash(digester.digest());
LOG.info("Image file of size " + newFile.length() + " saved in " LOG.info("Image file " + newFile + " of size " + newFile.length() +
+ (now() - startTime)/1000 + " seconds."); " bytes saved in " + (now() - startTime)/1000 + " seconds.");
} }
/** /**