org.apache.hadoop.hbase.tmpl.regionserver.RSStatusTmplImpl Maven / Gradle / Ivy
// Autogenerated Jamon implementation
// /Users/apurtell/src/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon
package org.apache.hadoop.hbase.tmpl.regionserver;
// 27, 1
import java.util.*;
// 28, 1
import org.apache.hadoop.hbase.regionserver.HRegionServer;
// 29, 1
import org.apache.hadoop.hbase.HRegionInfo;
// 30, 1
import org.apache.hadoop.hbase.ServerName;
// 31, 1
import org.apache.hadoop.hbase.HBaseConfiguration;
// 32, 1
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
// 33, 1
import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo;
// 34, 1
import org.apache.hadoop.hbase.zookeeper.MasterAddressTracker;
public class RSStatusTmplImpl
extends org.jamon.AbstractTemplateImpl
implements org.apache.hadoop.hbase.tmpl.regionserver.RSStatusTmpl.Intf
{
private final HRegionServer regionServer;
private final String format;
private final String filter;
private final String bcn;
private final String bcv;
protected static org.apache.hadoop.hbase.tmpl.regionserver.RSStatusTmpl.ImplData __jamon_setOptionalArguments(org.apache.hadoop.hbase.tmpl.regionserver.RSStatusTmpl.ImplData p_implData)
{
if(! p_implData.getFormat__IsNotDefault())
{
p_implData.setFormat("html");
}
if(! p_implData.getFilter__IsNotDefault())
{
p_implData.setFilter("general");
}
if(! p_implData.getBcn__IsNotDefault())
{
p_implData.setBcn("");
}
if(! p_implData.getBcv__IsNotDefault())
{
p_implData.setBcv("");
}
return p_implData;
}
public RSStatusTmplImpl(org.jamon.TemplateManager p_templateManager, org.apache.hadoop.hbase.tmpl.regionserver.RSStatusTmpl.ImplData p_implData)
{
super(p_templateManager, __jamon_setOptionalArguments(p_implData));
regionServer = p_implData.getRegionServer();
format = p_implData.getFormat();
filter = p_implData.getFilter();
bcn = p_implData.getBcn();
bcv = p_implData.getBcv();
}
@Override public void renderNoFlush(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 37, 1
if (format.equals("json") && bcn != null && bcn.length() > 0 )
{
// 37, 66
jamonWriter.write("\n ");
// 38, 3
{
org.apache.hadoop.hbase.tmpl.regionserver.BlockCacheViewTmpl __jamon__var_0 = new org.apache.hadoop.hbase.tmpl.regionserver.BlockCacheViewTmpl(this.getTemplateManager());
__jamon__var_0.renderNoFlush(jamonWriter, regionServer.getCacheConfig(), regionServer.getConfiguration(), bcn, bcv);
}
// 38, 136
jamonWriter.write("\n ");
// 39, 3
return;
}
// 40, 1
else if (format.equals("json") )
{
// 40, 34
jamonWriter.write("\n ");
// 41, 3
{
org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl __jamon__var_1 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager());
__jamon__var_1.setFilter(filter);
__jamon__var_1.setFormat("json" );
__jamon__var_1.renderNoFlush(jamonWriter);
}
// 41, 68
jamonWriter.write("\n ");
// 42, 3
return;
}
// 43, 7
jamonWriter.write("\n");
// 44, 1
ServerInfo serverInfo = ProtobufUtil.getServerInfo(null, regionServer.getRSRpcServices());
ServerName serverName = ProtobufUtil.toServerName(serverInfo.getServerName());
List onlineRegions = ProtobufUtil.getOnlineRegions(regionServer.getRSRpcServices());
MasterAddressTracker masterAddressTracker = regionServer.getMasterAddressTracker();
ServerName masterServerName = masterAddressTracker == null ? null
: masterAddressTracker.getMasterAddress();
int infoPort = masterAddressTracker == null ? 0 : masterAddressTracker.getMasterInfoPort();
// 53, 1
jamonWriter.write("\n\n\n \n \n HBase Region Server: ");
// 60, 33
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(serverName.getHostname()), jamonWriter);
// 60, 63
jamonWriter.write(" \n \n \n\n \n \n \n \n\n \n\n \n
\n
\n\n\n\n\n\n");
}
}
\n
\n \n
\n RegionServer "); // 100, 37 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(serverName), jamonWriter); // 100, 53 jamonWriter.write("
\n\n\n \n \n\n \n \n\n \n ");
// 117, 5
{
org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl __jamon__var_4 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager());
__jamon__var_4.setFilter(filter );
__jamon__var_4.renderNoFlush(jamonWriter);
}
// 117, 53
jamonWriter.write("\n \n\n \n \n\n\n \n \n
\n \n
\nServer Metrics
\n "); // 107, 5 { org.apache.hadoop.hbase.tmpl.regionserver.ServerMetricsTmpl __jamon__var_2 = new org.apache.hadoop.hbase.tmpl.regionserver.ServerMetricsTmpl(this.getTemplateManager()); __jamon__var_2.renderNoFlush(jamonWriter, regionServer.getRegionServerMetrics().getRegionServerWrapper(), regionServer.getRpcServer().getMetrics().getHBaseServerWrapper()); } // 108, 89 jamonWriter.write("\nBlock Cache
\n "); // 113, 5 { org.apache.hadoop.hbase.tmpl.regionserver.BlockCacheTmpl __jamon__var_3 = new org.apache.hadoop.hbase.tmpl.regionserver.BlockCacheTmpl(this.getTemplateManager()); __jamon__var_3.renderNoFlush(jamonWriter, regionServer.getCacheConfig(), regionServer.getConfiguration() ); } // 113, 112 jamonWriter.write("\nRegions
\n "); // 122, 5 { org.apache.hadoop.hbase.tmpl.regionserver.RegionListTmpl __jamon__var_5 = new org.apache.hadoop.hbase.tmpl.regionserver.RegionListTmpl(this.getTemplateManager()); __jamon__var_5.renderNoFlush(jamonWriter, regionServer, onlineRegions); } // 122, 86 jamonWriter.write("\nSoftware Attributes
\nAttribute Name | \nValue | \nDescription | \n
---|---|---|
HBase Version | \n"); // 136, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getVersion()), jamonWriter); // 136, 76 jamonWriter.write(", revision="); // 136, 87 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getRevision()), jamonWriter); // 136, 147 jamonWriter.write(" | \nHBase version and revision | \n
HBase Compiled | \n"); // 141, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getDate()), jamonWriter); // 141, 73 jamonWriter.write(", "); // 141, 75 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getUser()), jamonWriter); // 141, 131 jamonWriter.write(" | \nWhen HBase version was compiled and by whom | \n
HBase Source Checksum | \n"); // 146, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getSrcChecksum()), jamonWriter); // 146, 80 jamonWriter.write(" | \nHBase source MD5 checksum | \n
Hadoop Version | \n"); // 151, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getVersion()), jamonWriter); // 151, 70 jamonWriter.write(", revision="); // 151, 81 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getRevision()), jamonWriter); // 151, 135 jamonWriter.write(" | \nHadoop version and revision | \n
Hadoop Compiled | \n"); // 156, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getDate()), jamonWriter); // 156, 67 jamonWriter.write(", "); // 156, 69 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getUser()), jamonWriter); // 156, 119 jamonWriter.write(" | \nWhen Hadoop version was compiled and by whom | \n
Hadoop Source Checksum | \n"); // 161, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getSrcChecksum()), jamonWriter); // 161, 74 jamonWriter.write(" | \nHadoop source MD5 checksum | \n
ZooKeeper Client Version | \n"); // 166, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getVersion()), jamonWriter); // 166, 64 jamonWriter.write(", revision="); // 166, 75 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getRevision()), jamonWriter); // 166, 123 jamonWriter.write(" | \nZooKeeper client version and revision | \n
ZooKeeper Client Compiled | \n"); // 171, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getBuildDate()), jamonWriter); // 171, 66 jamonWriter.write(" | \nWhen ZooKeeper client version was compiled | \n
Zookeeper Quorum | \n"); // 176, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(regionServer.getZooKeeper().getQuorum()), jamonWriter); // 176, 62 jamonWriter.write(" | \nAddresses of all registered ZK servers | \n
Coprocessors | \n"); // 181, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(java.util.Arrays.toString(regionServer.getRegionServerCoprocessors())), jamonWriter); // 181, 92 jamonWriter.write(" | \nCoprocessors currently loaded by this regionserver | \n
RS Start Time | \n"); // 186, 17 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(new Date(regionServer.getStartcode())), jamonWriter); // 186, 60 jamonWriter.write(" | \nDate stamp of when this region server was started | \n
HBase Master | \n\n "); // 192, 17 if (masterServerName == null ) { // 192, 49 jamonWriter.write("\n No master found\n "); } // 194, 17 else { // 194, 24 jamonWriter.write("\n "); // 195, 17 String host = masterServerName.getHostname() + ":" + infoPort; String url = "//" + host + "/master-status"; // 199, 17 jamonWriter.write(""); // 199, 37 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(host), jamonWriter); // 199, 47 jamonWriter.write("\n "); } // 200, 23 jamonWriter.write("\n | \nAddress of HBase Master | \n