diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 695b67db1c5..d8a3673deba 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 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 08985d6162e..f1dd9597632 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); }