Package org.apache.hadoop.hdfs.server.namenode.ClusterJspHelper

Examples of org.apache.hadoop.hdfs.server.namenode.ClusterJspHelper.NameNodeKey


 
  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("Checkpoint state", NameNodeKey.ACTIVE),
            this.getFSImage().ckptState.toString());
      }
    } catch (Exception e) {
      // send partial information
      LOG.error(e.toString());
View Full Code Here


 
  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
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hdfs.server.namenode.ClusterJspHelper.NameNodeKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.