org.apache.hadoop.hbase.tmpl.regionserver.RSStatusTmplImpl 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
Main functionality for HBase
// Autogenerated Jamon implementation
// /home/apurtell/tmp/RM/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.client.RegionInfo;
// 30, 1
import org.apache.hadoop.hbase.ServerName;
// 31, 1
import org.apache.hadoop.hbase.HBaseConfiguration;
// 32, 1
import org.apache.hadoop.hbase.io.hfile.CacheConfig;
// 33, 1
import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
// 34, 1
import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ServerInfo;
// 35, 1
import org.apache.hadoop.hbase.util.JvmVersion;
// 36, 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 bcn;
private final String bcv;
private final String filter;
private final String format;
// 56, 1
public String formatZKString() {
StringBuilder quorums = new StringBuilder();
String zkQuorum = regionServer.getZooKeeper().getQuorum();
if (null == zkQuorum) {
return quorums.toString();
}
String[] zks = zkQuorum.split(",");
if (zks.length == 0) {
return quorums.toString();
}
for(int i = 0; i < zks.length; ++i) {
quorums.append(zks[i].trim());
if (i != (zks.length - 1)) {
quorums.append("
");
}
}
return quorums.toString();
}
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.getBcn__IsNotDefault())
{
p_implData.setBcn("");
}
if(! p_implData.getBcv__IsNotDefault())
{
p_implData.setBcv("");
}
if(! p_implData.getFilter__IsNotDefault())
{
p_implData.setFilter("general");
}
if(! p_implData.getFormat__IsNotDefault())
{
p_implData.setFormat("html");
}
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();
bcn = p_implData.getBcn();
bcv = p_implData.getBcv();
filter = p_implData.getFilter();
format = p_implData.getFormat();
}
@Override public void renderNoFlush(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 39, 1
if (format.equals("json") && bcn != null && bcn.length() > 0 )
{
// 39, 66
jamonWriter.write("\n ");
// 40, 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, new CacheConfig(regionServer.getConfiguration()), regionServer.getConfiguration(), bcn, bcv, regionServer.getBlockCache().orElse(null) );
}
// 40, 210
jamonWriter.write("\n ");
// 41, 3
return;
}
// 42, 1
else if (format.equals("json") )
{
// 42, 34
jamonWriter.write("\n ");
// 43, 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);
}
// 43, 68
jamonWriter.write("\n ");
// 44, 3
return;
}
// 45, 7
jamonWriter.write("\n");
// 46, 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();
// 83, 1
jamonWriter.write("\n\n\n \n \n HBase Region Server: ");
// 88, 33
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(serverName.getHostname()), jamonWriter);
// 88, 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 \n
\n RegionServer "); // 131, 37 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(serverName), jamonWriter); // 131, 53 jamonWriter.write("
\n\n\n \n \n\n \n \n\n \n ");
// 149, 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.setParent("/rs-status" );
__jamon__var_4.renderNoFlush(jamonWriter);
}
// 149, 76
jamonWriter.write("\n \n\n \n \n\n \n \n\n \n \n
\n \n
\nServer Metrics
\n "); // 138, 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.getMetrics().getRegionServerWrapper(), regionServer.getRpcServer().getMetrics().getHBaseServerWrapper(), regionServer.getRpcServer().getByteBuffAllocator()); } // 140, 75 jamonWriter.write("\nBlock Cache
\n "); // 145, 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, new CacheConfig(regionServer.getConfiguration()), regionServer.getConfiguration(), regionServer.getBlockCache().orElse(null) ); } // 145, 179 jamonWriter.write("\nRegions
\n "); // 154, 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); } // 154, 86 jamonWriter.write("\nReplication Status\n "); // 159, 5 { org.apache.hadoop.hbase.tmpl.regionserver.ReplicationStatusTmpl __jamon__var_6 = new org.apache.hadoop.hbase.tmpl.regionserver.ReplicationStatusTmpl(this.getTemplateManager()); __jamon__var_6.renderNoFlush(jamonWriter, regionServer); } // 159, 62 jamonWriter.write("\n
Software Attributes
\nAttribute Name | \nValue | \nDescription | \n
---|---|---|
JVM Version | \n"); // 172, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(JvmVersion.getVersion()), jamonWriter); // 172, 46 jamonWriter.write(" | \nJVM vendor and version | \n
HBase Version | \n"); // 177, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getVersion()), jamonWriter); // 177, 76 jamonWriter.write(", revision="); // 177, 87 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getRevision()), jamonWriter); // 177, 147 jamonWriter.write(" | \nHBase version and revision | \n
HBase Compiled | \n"); // 182, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getDate()), jamonWriter); // 182, 73 jamonWriter.write(", "); // 182, 75 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getUser()), jamonWriter); // 182, 131 jamonWriter.write(" | \nWhen HBase version was compiled and by whom | \n
HBase Source Checksum | \n"); // 187, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getSrcChecksum()), jamonWriter); // 187, 80 jamonWriter.write(" | \nHBase source SHA512 checksum | \n
Hadoop Version | \n"); // 192, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getVersion()), jamonWriter); // 192, 70 jamonWriter.write(", revision="); // 192, 81 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getRevision()), jamonWriter); // 192, 135 jamonWriter.write(" | \nHadoop version and revision | \n
Hadoop Compiled | \n"); // 197, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getDate()), jamonWriter); // 197, 67 jamonWriter.write(", "); // 197, 69 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getUser()), jamonWriter); // 197, 119 jamonWriter.write(" | \nWhen Hadoop version was compiled and by whom | \n
Hadoop Source Checksum | \n"); // 202, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getSrcChecksum()), jamonWriter); // 202, 74 jamonWriter.write(" | \nHadoop source MD5 checksum | \n
ZooKeeper Client Version | \n"); // 207, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getVersion()), jamonWriter); // 207, 64 jamonWriter.write(", revision="); // 207, 75 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getRevisionHash()), jamonWriter); // 207, 127 jamonWriter.write(" | \nZooKeeper client version and revision hash | \n
ZooKeeper Client Compiled | \n"); // 212, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getBuildDate()), jamonWriter); // 212, 66 jamonWriter.write(" | \nWhen ZooKeeper client version was compiled | \n
ZooKeeper Quorum | \n"); // 218, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter); // 218, 39 jamonWriter.write(" | \nAddresses of all registered ZK servers | \n
Coprocessors | \n"); // 223, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(java.util.Arrays.toString(regionServer.getRegionServerCoprocessors())), jamonWriter); // 223, 92 jamonWriter.write(" | \nCoprocessors currently loaded by this regionserver | \n
RS Start Time | \n"); // 228, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(regionServer.getStartcode())), jamonWriter); // 228, 60 jamonWriter.write(" | \nDate stamp of when this region server was started | \n
HBase Master | \n\n "); // 234, 17 if (masterServerName == null ) { // 234, 49 jamonWriter.write("\n No master found\n "); } // 236, 17 else { // 236, 24 jamonWriter.write("\n "); // 237, 17 String host = masterServerName.getHostname() + ":" + infoPort; String url = "//" + host + "/master-status"; // 241, 17 jamonWriter.write(""); // 241, 37 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(host), jamonWriter); // 241, 47 jamonWriter.write("\n "); } // 242, 23 jamonWriter.write("\n | \nAddress of HBase Master | \n