All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmplImpl Maven / Gradle / Ivy

There is a newer version: 4.15.0-HBase-1.5
Show newest version
// Autogenerated Jamon implementation
// /Users/apurtell/src/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/BackupMasterStatusTmpl.jamon

package org.apache.hadoop.hbase.tmpl.master;

// 23, 1
import java.util.*;
// 24, 1
import org.apache.hadoop.hbase.ServerName;
// 25, 1
import org.apache.hadoop.hbase.ClusterStatus;
// 26, 1
import org.apache.hadoop.hbase.master.HMaster;
// 27, 1
import org.apache.hadoop.hbase.zookeeper.MasterAddressTracker;

public class BackupMasterStatusTmplImpl
  extends org.jamon.AbstractTemplateImpl
  implements org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl.Intf

{
  private final HMaster master;
  protected static org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl.ImplData __jamon_setOptionalArguments(org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl.ImplData p_implData)
  {
    return p_implData;
  }
  public BackupMasterStatusTmplImpl(org.jamon.TemplateManager p_templateManager, org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl.ImplData p_implData)
  {
    super(p_templateManager, __jamon_setOptionalArguments(p_implData));
    master = p_implData.getMaster();
  }
  
  @Override public void renderNoFlush(final java.io.Writer jamonWriter)
    throws java.io.IOException
  {
    // 29, 1
    
MasterAddressTracker masterAddressTracker = master.getMasterAddressTracker();

    // 33, 1
    if ((!master.isActiveMaster()) )
    {
      // 33, 35
      jamonWriter.write("\n    ");
      // 34, 5
      
    ServerName active_master =
        (masterAddressTracker == null) ? null : masterAddressTracker.getMasterAddress();
    assert active_master != null : "Failed to retrieve master's ServerName!";
    int infoPort = (masterAddressTracker == null) ? 0 : masterAddressTracker.getMasterInfoPort();
    
      // 40, 5
      jamonWriter.write("
\n
\n

Backup Master "); // 42, 38 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerName().getHostname()), jamonWriter); // 42, 80 jamonWriter.write("

\n
\n
\n

Current Active Master: "); // 46, 25 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(active_master.getHostname()), jamonWriter); // 46, 58 jamonWriter.write("

\n"); } // 47, 1 else { // 47, 8 jamonWriter.write("\n

Backup Masters

\n\n \n \n \n \n \n \n "); // 56, 5 Collection backup_masters = master.getClusterStatusWithoutCoprocessor().getBackupMasters(); ServerName [] backupServerNames = backup_masters.toArray(new ServerName[backup_masters.size()]); Arrays.sort(backupServerNames); for (ServerName serverName : backupServerNames) { int infoPort = (masterAddressTracker == null) ? 0 : masterAddressTracker .getBackupMasterInfoPort(serverName); // 65, 5 jamonWriter.write("\n \n \n \n \n "); // 72, 5 } // 75, 5 jamonWriter.write("\n
ServerNamePortStart Time
"); // 67, 29 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(serverName.getHostname()), jamonWriter); // 67, 59 jamonWriter.write("\n "); // 69, 13 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(serverName.getPort()), jamonWriter); // 69, 39 jamonWriter.write(""); // 70, 13 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(new Date(serverName.getStartcode())), jamonWriter); // 70, 54 jamonWriter.write("
Total:"); // 75, 19 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(backupServerNames.length), jamonWriter); // 75, 49 jamonWriter.write("
\n"); } // 77, 7 jamonWriter.write("\n"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy