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

org.apache.hadoop.hbase.tmpl.regionserver.RSStatusTmplImpl Maven / Gradle / Ivy

There is a newer version: 3.0.0-beta-1
Show newest version
// Autogenerated Jamon implementation
// /home/taklwu/hbase-rm/output/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_8 = new org.apache.hadoop.hbase.tmpl.regionserver.BlockCacheViewTmpl(this.getTemplateManager()); __jamon__var_8.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_9 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager()); __jamon__var_9.setFilter(filter); __jamon__var_9.setFormat("json" ); __jamon__var_9.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 \"HBase\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

Server Metrics

\n "); // 138, 5 { org.apache.hadoop.hbase.tmpl.regionserver.ServerMetricsTmpl __jamon__var_10 = new org.apache.hadoop.hbase.tmpl.regionserver.ServerMetricsTmpl(this.getTemplateManager()); __jamon__var_10.renderNoFlush(jamonWriter, regionServer.getMetrics().getRegionServerWrapper(), regionServer.getRpcServer().getMetrics().getHBaseServerWrapper(), regionServer.getRpcServer().getByteBuffAllocator()); } // 140, 75 jamonWriter.write("\n
\n\n
\n

Block Cache

\n "); // 145, 5 { org.apache.hadoop.hbase.tmpl.regionserver.BlockCacheTmpl __jamon__var_11 = new org.apache.hadoop.hbase.tmpl.regionserver.BlockCacheTmpl(this.getTemplateManager()); __jamon__var_11.renderNoFlush(jamonWriter, new CacheConfig(regionServer.getConfiguration()), regionServer.getConfiguration(), regionServer.getBlockCache().orElse(null) ); } // 145, 179 jamonWriter.write("\n
\n\n
\n "); // 149, 5 { org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl __jamon__var_12 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager()); __jamon__var_12.setFilter(filter); __jamon__var_12.setParent("/rs-status" ); __jamon__var_12.renderNoFlush(jamonWriter); } // 149, 76 jamonWriter.write("\n
\n\n
\n

Regions

\n "); // 154, 5 { org.apache.hadoop.hbase.tmpl.regionserver.RegionListTmpl __jamon__var_13 = new org.apache.hadoop.hbase.tmpl.regionserver.RegionListTmpl(this.getTemplateManager()); __jamon__var_13.renderNoFlush(jamonWriter, regionServer, onlineRegions); } // 154, 86 jamonWriter.write("\n
\n\n
\n

Replication Status

\n "); // 159, 5 { org.apache.hadoop.hbase.tmpl.regionserver.ReplicationStatusTmpl __jamon__var_14 = new org.apache.hadoop.hbase.tmpl.regionserver.ReplicationStatusTmpl(this.getTemplateManager()); __jamon__var_14.renderNoFlush(jamonWriter, regionServer); } // 159, 62 jamonWriter.write("\n
\n\n
\n

Software Attributes

\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 \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 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Attribute NameValueDescription
JVM Version"); // 172, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(JvmVersion.getVersion()), jamonWriter); // 172, 46 jamonWriter.write("JVM vendor and version
HBase Version"); // 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("HBase version and revision
HBase Compiled"); // 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("When HBase version was compiled and by whom
HBase Source Checksum"); // 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("HBase source SHA512 checksum
Hadoop Version"); // 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("Hadoop version and revision
Hadoop Compiled"); // 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("When Hadoop version was compiled and by whom
Hadoop Source Checksum"); // 202, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getSrcChecksum()), jamonWriter); // 202, 74 jamonWriter.write("Hadoop source MD5 checksum
ZooKeeper Client Version"); // 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("ZooKeeper client version and revision hash
ZooKeeper Client Compiled"); // 212, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getBuildDate()), jamonWriter); // 212, 66 jamonWriter.write("When ZooKeeper client version was compiled
ZooKeeper Quorum"); // 218, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter); // 218, 39 jamonWriter.write("Addresses of all registered ZK servers
Coprocessors"); // 223, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(java.util.Arrays.toString(regionServer.getRegionServerCoprocessors())), jamonWriter); // 223, 92 jamonWriter.write("Coprocessors currently loaded by this regionserver
RS Start Time"); // 228, 17 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(regionServer.getStartcode())), jamonWriter); // 228, 60 jamonWriter.write("Date stamp of when this region server was started
HBase Master\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 Address of HBase Master
\n
\n
\n
\n\n\n\n\n\n\n\n"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy