HDFS-9569. Log the name of the fsimage being loaded for better supportability. Contributed by Yongjun Zhang.

(cherry picked from commit eb6939cea0)
This commit is contained in:
Kihwal Lee 2015-12-17 10:30:58 -06:00
parent 3d0222eafd
commit 03e10f1fb3
2 changed files with 6 additions and 3 deletions

View File

@ -1644,6 +1644,9 @@ Release 2.7.3 - UNRELEASED
IMPROVEMENTS IMPROVEMENTS
HDFS-9569. Log the name of the fsimage being loaded for better
supportability (Yongjun Zhang via kihwal)
OPTIMIZATIONS OPTIMIZATIONS
BUG FIXES BUG FIXES

View File

@ -671,8 +671,8 @@ LayoutVersion.Feature.TXID_BASED_LAYOUT, getLayoutVersion())) {
imageFile = imageFiles.get(i); imageFile = imageFiles.get(i);
loadFSImageFile(target, recovery, imageFile, startOpt); loadFSImageFile(target, recovery, imageFile, startOpt);
break; break;
} catch (IOException ioe) { } catch (Exception e) {
LOG.error("Failed to load image from " + imageFile, ioe); LOG.error("Failed to load image from " + imageFile, e);
target.clear(); target.clear();
imageFile = null; imageFile = null;
} }
@ -725,7 +725,7 @@ private void rollingRollback(long discardSegmentTxId, long ckptId)
void loadFSImageFile(FSNamesystem target, MetaRecoveryContext recovery, void loadFSImageFile(FSNamesystem target, MetaRecoveryContext recovery,
FSImageFile imageFile, StartupOption startupOption) throws IOException { 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; StorageDirectory sdForProperties = imageFile.sd;
storage.readProperties(sdForProperties, startupOption); storage.readProperties(sdForProperties, startupOption);