From 4d2ee51c52d371a10501a76f5bfc2d78a40e2083 Mon Sep 17 00:00:00 2001 From: Kihwal Lee Date: Thu, 17 Dec 2015 10:33:15 -0600 Subject: [PATCH] HDFS-9569. Log the name of the fsimage being loaded for better supportability. Contributed by Yongjun Zhang. (cherry picked from commit eb6939cea0343840c62b930d4adb377f5eaf879f) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../org/apache/hadoop/hdfs/server/namenode/FSImage.java | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index b7b3cda0a6e..f95eada3852 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -11,6 +11,9 @@ Release 2.7.3 - UNRELEASED HDFS-8647. Abstract BlockManager's rack policy into BlockPlacementPolicy. (Brahma Reddy Battula via mingma) + HDFS-9569. Log the name of the fsimage being loaded for better + supportability (Yongjun Zhang via kihwal) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java index 5a7fbb14631..475ae7e275b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java @@ -675,8 +675,8 @@ public class FSImage implements Closeable { imageFile = imageFiles.get(i); loadFSImageFile(target, recovery, imageFile, startOpt); break; - } catch (IOException ioe) { - LOG.error("Failed to load image from " + imageFile, ioe); + } catch (Exception e) { + LOG.error("Failed to load image from " + imageFile, e); target.clear(); imageFile = null; } @@ -727,7 +727,7 @@ public class FSImage implements Closeable { void loadFSImageFile(FSNamesystem target, MetaRecoveryContext recovery, FSImageFile imageFile, StartupOption startupOption) throws IOException { - LOG.debug("Planning to load image :\n" + imageFile); + LOG.info("Planning to load image: " + imageFile); StorageDirectory sdForProperties = imageFile.sd; storage.readProperties(sdForProperties, startupOption);