protected Map<NameNodeKey, String> getNameNodeSpecificKeys(){
Map<NameNodeKey, String> map = new HashMap<NameNodeKey, String>();
try{
map.put(new NameNodeKey("Last applied transaction id", NameNodeKey.BOTH),
toStr(getFSImage().getEditLog().getLastWrittenTxId()));
if (currentAvatar == Avatar.STANDBY) {
map.put(new NameNodeKey("Standby: ignore datanodes",
NameNodeKey.STANDBY), toStr(this.ignoreDatanodes()));
map.put(new NameNodeKey("Standby: ingest state", NameNodeKey.STANDBY),
toStr((standby == null) ? "" : standby.currentIngestState));
map.put(new NameNodeKey("Standby: ingest fell behind", NameNodeKey.STANDBY),
toStr((standby == null) ? "" : standby.fellBehind()));
map.put(new NameNodeKey("Standby: ingest lag bytes", NameNodeKey.STANDBY),
toStr((standby == null) ? 0L : standby.getLagBytes()));
map.put(new NameNodeKey("Standby: checkpoint status", NameNodeKey.STANDBY),
toStr((standby == null) ? "" : standby.getCheckpointStatus()));
map.put(new NameNodeKey("Standby: failover in progress",
NameNodeKey.STANDBY), toStr(standbySafeMode.failoverInProgress()));
if (standbySafeMode.failoverInProgress()) {
map.put(new NameNodeKey("Standby: failover outstanding heartbeats",
NameNodeKey.STANDBY), toStr(standbySafeMode
.getOutStandingHeartbeats().size()));
map.put(new NameNodeKey("Standby: failover outstanding reports",
NameNodeKey.STANDBY), toStr(standbySafeMode
.getOutStandingReports().size()));
}
} else {
map.put(new NameNodeKey("Last checkpoint txid", NameNodeKey.ACTIVE),
toStr(this.getFSImage().storage.getMostRecentCheckpointTxId()));
map.put(new NameNodeKey("Last checkpoint time", NameNodeKey.ACTIVE),
this.getFSImage().storage.getMostRecentCheckpointTime());
}
} catch (Exception e) {
// send partial information