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

This commit is contained in:
Vinayakumar B 2015-04-13 17:16:05 +05:30
parent f8f5887209
commit 14384f5b51
2 changed files with 8 additions and 1 deletions

View File

@ -482,6 +482,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

View File

@ -137,7 +137,11 @@ public class OfflineImageViewer {
done = true;
} finally {
if (!done) {
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);
}