org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmplImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hbase-server Show documentation
Show all versions of hbase-server Show documentation
Server functionality for HBase
// Autogenerated Jamon implementation
// /home/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 = master.getConfiguration().getInt("hbase.master.info.port", 60010);
// 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 ServerName \n Port \n Start Time \n \n ");
// 56, 5
Collection backup_masters = master.getClusterStatus().getBackupMasters();
ServerName [] backupServerNames = backup_masters.toArray(new ServerName[backup_masters.size()]);
Arrays.sort(backupServerNames);
for (ServerName serverName : backupServerNames) {
int infoPort = master.getConfiguration().getInt("hbase.master.info.port", 60010);
// 63, 5
jamonWriter.write("\n ");
// 65, 29
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(serverName.getHostname()), jamonWriter);
// 65, 59
jamonWriter.write("\n \n ");
// 67, 13
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(serverName.getPort()), jamonWriter);
// 67, 39
jamonWriter.write(" \n ");
// 68, 13
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(new Date(serverName.getStartcode())), jamonWriter);
// 68, 54
jamonWriter.write(" \n \n ");
// 70, 5
}
// 73, 5
jamonWriter.write("Total:");
// 73, 19
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(backupServerNames.length), jamonWriter);
// 73, 49
jamonWriter.write(" \n
\n");
}
// 75, 7
jamonWriter.write("\n");
}
}