fsn.writeLock();
// We need to capture all information under a namesystem lock, since we
// might leave safemode and the safemode object might be set to null.
try {
isStandby = (nn.reportAvatar() == Avatar.STANDBY);
StandbySafeMode sm = nn.getStandbySafeMode();
if (sm == null && isStandby) {
msg = standbyNull;
} else if (sm == null) {
msg = notStandby;
} else {
isFailover = sm.failoverInProgress();
heartbeats = sm.getOutStandingHeartbeats();
reports = sm.getOutStandingReports();
}
} finally {
fsn.writeUnlock();
}