hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vinayakum...@apache.org
Subject hadoop git commit: HDFS-8111. NPE thrown when invalid FSImage filename given for 'hdfs oiv_legacy' cmd ( Contributed by surendra singh lilhore )
Date Mon, 13 Apr 2015 11:49:42 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 293c763e8 -> 1071a57b2


HDFS-8111. NPE thrown when invalid FSImage filename given for 'hdfs oiv_legacy' cmd ( Contributed
by surendra singh lilhore )

(cherry picked from commit 14384f5b5142a98a10ce4bffadeb13e89bda9365)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/1071a57b
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/1071a57b
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/1071a57b

Branch: refs/heads/branch-2
Commit: 1071a57b20a0e71d3e8525a84cdf46707cd3a7f2
Parents: 293c763
Author: Vinayakumar B <vinayakumarb@apache.org>
Authored: Mon Apr 13 17:16:05 2015 +0530
Committer: Vinayakumar B <vinayakumarb@apache.org>
Committed: Mon Apr 13 17:19:18 2015 +0530

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                    | 3 +++
 .../hdfs/tools/offlineImageViewer/OfflineImageViewer.java      | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/1071a57b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 695b67d..d8a3673d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -164,6 +164,9 @@ Release 2.8.0 - UNRELEASED
     HDFS-7939. Two fsimage_rollback_* files are created which are not deleted
     after rollback. (J.Andreina via vinayakumarb)
 
+    HDFS-8111. NPE thrown when invalid FSImage filename given for
+    'hdfs oiv_legacy' cmd ( surendra singh lilhore via vinayakumarb )
+
 Release 2.7.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1071a57b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageViewer.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageViewer.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageViewer.java
index 08985d6..f1dd959 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageViewer.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageViewer.java
@@ -137,7 +137,11 @@ public class OfflineImageViewer {
       done = true;
     } finally {
       if (!done) {
-        LOG.error("image loading failed at offset " + tracker.getPos());
+        if (tracker != null) {
+          LOG.error("image loading failed at offset " + tracker.getPos());
+        } else {
+          LOG.error("Failed to load image file.");
+        }
       }
       IOUtils.cleanup(LOG, in, tracker);
     }


Mime
View raw message