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

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

The newest version!
// Autogenerated Jamon implementation
// /Users/apurtell/src/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon

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

// 32, 1
import java.util.*;
// 33, 1
import org.apache.hadoop.util.StringUtils;
// 34, 1
import org.apache.hadoop.hbase.util.Bytes;
// 35, 1
import org.apache.hadoop.hbase.util.JvmVersion;
// 36, 1
import org.apache.hadoop.hbase.util.FSUtils;
// 37, 1
import org.apache.hadoop.hbase.master.HMaster;
// 38, 1
import org.apache.hadoop.hbase.master.AssignmentManager;
// 39, 1
import org.apache.hadoop.hbase.master.ServerManager;
// 40, 1
import org.apache.hadoop.hbase.HConstants;
// 41, 1
import org.apache.hadoop.hbase.NamespaceDescriptor;
// 42, 1
import org.apache.hadoop.hbase.ServerLoad;
// 43, 1
import org.apache.hadoop.hbase.ServerName;
// 44, 1
import org.apache.hadoop.hbase.client.Admin;
// 45, 1
import org.apache.hadoop.hbase.client.HConnectionManager;
// 46, 1
import org.apache.hadoop.hbase.client.replication.ReplicationAdmin;
// 47, 1
import org.apache.hadoop.hbase.HRegionInfo;
// 48, 1
import org.apache.hadoop.hbase.master.RegionState;
// 49, 1
import org.apache.hadoop.hbase.HTableDescriptor;
// 50, 1
import org.apache.hadoop.hbase.HBaseConfiguration;
// 51, 1
import org.apache.hadoop.hbase.TableName;
// 52, 1
import org.apache.hadoop.hbase.tool.CanaryTool;
// 53, 1
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
// 54, 1
import org.apache.hadoop.hbase.master.DeadServer;
// 55, 1
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
// 56, 1
import org.apache.hadoop.hbase.replication.ReplicationPeer;
// 57, 1
import org.apache.hadoop.hbase.replication.ReplicationPeerConfig;
// 58, 1
import org.apache.hadoop.hbase.replication.ReplicationSerDeHelper;
// 59, 1
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants;
// 60, 1
import org.apache.hadoop.hbase.security.access.AccessControlLists;
// 61, 1
import org.apache.hadoop.hbase.quotas.QuotaUtil;

public class MasterStatusTmplImpl
  extends org.jamon.AbstractTemplateImpl
  implements org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl.Intf

{
  private final HMaster master;
  private final AssignmentManager assignmentManager;
  private final boolean catalogJanitorEnabled;
  private final Map frags;
  private final String filter;
  private final List servers;
  private final ServerManager serverManager;
  private final Set deadServers;
  private final String format;
  private final ServerName metaLocation;
  // 73, 1
  
  public String formatZKString() {
    StringBuilder quorums = new StringBuilder();
    String zkQuorum = master.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.master.MasterStatusTmpl.ImplData __jamon_setOptionalArguments(org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl.ImplData p_implData) { if(! p_implData.getAssignmentManager__IsNotDefault()) { p_implData.setAssignmentManager(null); } if(! p_implData.getCatalogJanitorEnabled__IsNotDefault()) { p_implData.setCatalogJanitorEnabled(true); } if(! p_implData.getFrags__IsNotDefault()) { p_implData.setFrags(null); } if(! p_implData.getFilter__IsNotDefault()) { p_implData.setFilter("general"); } if(! p_implData.getServers__IsNotDefault()) { p_implData.setServers(null); } if(! p_implData.getServerManager__IsNotDefault()) { p_implData.setServerManager(null); } if(! p_implData.getDeadServers__IsNotDefault()) { p_implData.setDeadServers(null); } if(! p_implData.getFormat__IsNotDefault()) { p_implData.setFormat("html"); } if(! p_implData.getMetaLocation__IsNotDefault()) { p_implData.setMetaLocation(null); } return p_implData; } public MasterStatusTmplImpl(org.jamon.TemplateManager p_templateManager, org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl.ImplData p_implData) { super(p_templateManager, __jamon_setOptionalArguments(p_implData)); master = p_implData.getMaster(); assignmentManager = p_implData.getAssignmentManager(); catalogJanitorEnabled = p_implData.getCatalogJanitorEnabled(); frags = p_implData.getFrags(); filter = p_implData.getFilter(); servers = p_implData.getServers(); serverManager = p_implData.getServerManager(); deadServers = p_implData.getDeadServers(); format = p_implData.getFormat(); metaLocation = p_implData.getMetaLocation(); } @Override public void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException { // 64, 1 if (format.equals("json") ) { // 64, 30 jamonWriter.write("\n "); // 65, 3 { org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl __jamon__var_7 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager()); __jamon__var_7.setFormat("json" ); __jamon__var_7.setFilter(filter); __jamon__var_7.renderNoFlush(jamonWriter); } // 65, 68 jamonWriter.write("\n "); // 66, 3 return; } // 67, 7 jamonWriter.write("\n"); // 68, 1 ServerManager serverManager = master.getServerManager(); AssignmentManager assignmentManager = master.getAssignmentManager(); // 100, 1 jamonWriter.write("\n\n\n \n \n "); // 107, 12 if (master.isActiveMaster() ) { // 107, 43 jamonWriter.write("Master: "); } // 107, 51 else { // 107, 58 jamonWriter.write("Backup Master: "); } // 107, 79 jamonWriter.write("\n "); // 108, 5 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerName().getHostname()), jamonWriter); // 108, 47 jamonWriter.write("\n \n \n \n \n \n \n\n \n\n
\n
\n
\n \n \"HBase\n
\n
\n \n
\n
\n
\n\n
\n\t"); // 147, 2 if (master.isActiveMaster() ) { // 147, 33 jamonWriter.write("\n
\n
\n

Master "); // 150, 35 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerName().getHostname()), jamonWriter); // 150, 77 jamonWriter.write("

\n
\n
\n\n
\n \n "); // 156, 9 if (JvmVersion.isBadJvmVersion() ) { // 156, 45 jamonWriter.write("\n
\n Your current JVM version "); // 158, 36 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(System.getProperty("java.version")), jamonWriter); // 158, 76 jamonWriter.write(" is known to be\n unstable with HBase. Please see the\n HBase wiki\n for details.\n
\n "); } // 163, 15 jamonWriter.write("\n "); // 164, 9 if (master.isInitialized() && !catalogJanitorEnabled ) { // 164, 65 jamonWriter.write("\n
\n Please note that your cluster is running with the CatalogJanitor disabled. It can be\n re-enabled from the hbase shell by running the command 'catalogjanitor_switch true'\n
\n "); } // 169, 15 jamonWriter.write("\n "); // 170, 9 if (master.isInMaintenanceMode() ) { // 170, 45 jamonWriter.write("\n
\n Your Master is in maintenance mode. This may be because of HBCK aborting while\n running in repair mode. Please re-run HBCK in repair mode.\n
\n "); } // 175, 15 jamonWriter.write("\n "); // 176, 9 if (!master.isBalancerOn() ) { // 176, 39 jamonWriter.write("\n
\n The Load Balancer is not enabled which will eventually cause performance degradation\n in HBase as Regions will not be distributed across all RegionServers. The balancer\n is only expected to be disabled during rolling upgrade scenarios.\n
\n "); } // 182, 15 jamonWriter.write("\n "); // 183, 9 if (!master.isSplitOrMergeEnabled(Admin.MasterSwitchType.SPLIT) ) { // 183, 76 jamonWriter.write("\n
\n Region splits are disabled. This may be the result of HBCK aborting while\n running in repair mode. Manually enable splits from the HBase shell,\n or re-run HBCK in repair mode.\n
\n "); } // 189, 15 jamonWriter.write("\n "); // 190, 9 if (!master.isSplitOrMergeEnabled(Admin.MasterSwitchType.MERGE) ) { // 190, 76 jamonWriter.write("\n
\n Region merges are disabled. This may be the result of HBCK aborting while\n running in repair mode. Manually enable merges from the HBase shell,\n or re-run HBCK in repair mode.\n
\n "); } // 196, 15 jamonWriter.write("\n\n
\n

Region Servers

\n "); // 200, 13 { org.apache.hadoop.hbase.tmpl.master.RegionServerListTmpl __jamon__var_8 = new org.apache.hadoop.hbase.tmpl.master.RegionServerListTmpl(this.getTemplateManager()); __jamon__var_8.setServers(servers ); __jamon__var_8.renderNoFlush(jamonWriter, master); } // 200, 74 jamonWriter.write("\n\n "); // 202, 13 if ((deadServers != null) ) { // 202, 42 jamonWriter.write("\n "); // 203, 17 { // 203, 17 __jamon_innerUnit__deadRegionServers(jamonWriter); } // 203, 40 jamonWriter.write("\n "); } // 204, 19 jamonWriter.write("\n
\n
\n "); // 207, 13 { org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl __jamon__var_9 = new org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl(this.getTemplateManager()); __jamon__var_9.renderNoFlush(jamonWriter, master ); } // 207, 58 jamonWriter.write("\n
\n
\n

Tables

\n
\n \n
\n
\n "); // 225, 25 if ((metaLocation != null) ) { // 225, 55 jamonWriter.write("\n "); // 226, 29 { // 226, 29 __jamon_innerUnit__userTables(jamonWriter); } // 226, 45 jamonWriter.write("\n "); } // 227, 31 jamonWriter.write("\n
\n
\n "); // 230, 25 if ((metaLocation != null) ) { // 230, 55 jamonWriter.write("\n "); // 231, 29 { // 231, 29 __jamon_innerUnit__catalogTables(jamonWriter); } // 231, 48 jamonWriter.write("\n "); } // 232, 31 jamonWriter.write("\n
\n
\n "); // 235, 25 { // 235, 25 __jamon_innerUnit__userSnapshots(jamonWriter); } // 235, 44 jamonWriter.write("\n
\n
\n
\n
\n
\n

Peers

\n "); // 242, 13 { // 242, 13 __jamon_innerUnit__peerConfigs(jamonWriter); } // 242, 30 jamonWriter.write("\n
\n "); // 244, 9 if (master.getAssignmentManager() != null ) { // 244, 54 jamonWriter.write("\n "); // 245, 9 { org.apache.hadoop.hbase.tmpl.master.AssignmentManagerStatusTmpl __jamon__var_10 = new org.apache.hadoop.hbase.tmpl.master.AssignmentManagerStatusTmpl(this.getTemplateManager()); __jamon__var_10.renderNoFlush(jamonWriter, master.getAssignmentManager()); } // 245, 90 jamonWriter.write("\n "); } // 246, 15 jamonWriter.write("\n\t"); } // 247, 2 else { // 247, 9 jamonWriter.write("\n
\n "); // 249, 13 { org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl __jamon__var_11 = new org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl(this.getTemplateManager()); __jamon__var_11.renderNoFlush(jamonWriter, master ); } // 249, 58 jamonWriter.write("\n
\n\t"); } // 251, 8 jamonWriter.write("\n\n\n
\n "); // 255, 13 { 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.renderNoFlush(jamonWriter); } // 255, 61 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 "); // 326, 17 if (master.isActiveMaster() ) { // 326, 48 jamonWriter.write("\n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t "); // 343, 18 if (frags != null ) { // 343, 39 jamonWriter.write("\n\t \n\t \n\t \n\t \n\t \n\t "); } // 349, 24 jamonWriter.write("\n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n "); } // 361, 23 jamonWriter.write("\n
Attribute NameValueDescription
HBase Version"); // 268, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getVersion()), jamonWriter); // 268, 84 jamonWriter.write(", revision="); // 268, 95 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getRevision()), jamonWriter); // 268, 155 jamonWriter.write("HBase version and revision
HBase Compiled"); // 272, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getDate()), jamonWriter); // 272, 81 jamonWriter.write(", "); // 272, 83 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getUser()), jamonWriter); // 272, 139 jamonWriter.write("When HBase version was compiled and by whom
HBase Source Checksum"); // 277, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getSrcChecksum()), jamonWriter); // 277, 88 jamonWriter.write("HBase source MD5 checksum
Hadoop Version"); // 282, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getVersion()), jamonWriter); // 282, 78 jamonWriter.write(", revision="); // 282, 89 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getRevision()), jamonWriter); // 282, 143 jamonWriter.write("Hadoop version and revision
Hadoop Compiled"); // 287, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getDate()), jamonWriter); // 287, 75 jamonWriter.write(", "); // 287, 77 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getUser()), jamonWriter); // 287, 127 jamonWriter.write("When Hadoop version was compiled and by whom
Hadoop Source Checksum"); // 292, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getSrcChecksum()), jamonWriter); // 292, 82 jamonWriter.write("Hadoop source MD5 checksum
ZooKeeper Client Version"); // 297, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getVersion()), jamonWriter); // 297, 72 jamonWriter.write(", revision="); // 297, 83 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getRevision()), jamonWriter); // 297, 131 jamonWriter.write("ZooKeeper client version and revision
ZooKeeper Client Compiled"); // 302, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getBuildDate()), jamonWriter); // 302, 74 jamonWriter.write("When ZooKeeper client version was compiled
Zookeeper Quorum "); // 308, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter); // 308, 48 jamonWriter.write(" Addresses of all registered ZK servers. For more, see zk dump.
Zookeeper Base Path "); // 313, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getZooKeeper().getBaseZNode()), jamonWriter); // 313, 68 jamonWriter.write("Root node of this cluster in ZK.
HBase Root Directory"); // 318, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(FSUtils.getRootDir(master.getConfiguration()).toString()), jamonWriter); // 318, 87 jamonWriter.write("Location of HBase home directory
HMaster Start Time"); // 323, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterStartTime())), jamonWriter); // 323, 68 jamonWriter.write("Date stamp of when this HMaster was started
HMaster Active Time"); // 329, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterActiveTime())), jamonWriter); // 329, 70 jamonWriter.write("Date stamp of when this HMaster became active
HBase Cluster ID"); // 334, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getClusterId() != null ? master.getClusterId() : "Not set"), jamonWriter); // 334, 97 jamonWriter.write("Unique identifier generated for each HBase cluster
Load average"); // 339, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerManager() == null ? "0.00" : StringUtils.limitDecimalTo2(master.getServerManager().getAverageLoad())), jamonWriter); // 340, 98 jamonWriter.write("Average number of regions per regionserver. Naive computation.
Fragmentation"); // 346, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get("-TOTAL-") != null ? frags.get("-TOTAL-").intValue() + "%" : "n/a"), jamonWriter); // 346, 108 jamonWriter.write("Overall fragmentation of all tables, including hbase:meta
Coprocessors"); // 352, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getMasterCoprocessorHost() == null ? "[]" : java.util.Arrays.toString(master.getMasterCoprocessors())), jamonWriter); // 353, 84 jamonWriter.write("Coprocessors currently loaded by the master
LoadBalancer"); // 358, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getLoadBalancerClassName()), jamonWriter); // 358, 65 jamonWriter.write("LoadBalancer to be used in the Master
\n
\n
\n
\n\n \n \n \n \n \n \n\n\n"); } // 503, 1 private void __jamon_innerUnit__userSnapshots(final java.io.Writer jamonWriter) throws java.io.IOException { // 504, 1 List snapshots = null; try (Admin admin = master.getConnection().getAdmin()) { snapshots = master.isInitialized() ? admin.listSnapshots() : null; } // 510, 1 if ((snapshots != null && snapshots.size() > 0)) { // 510, 51 jamonWriter.write("\n\n \n \n \n \n \n "); // 517, 5 for (SnapshotDescription snapshotDesc : snapshots) { // 517, 57 jamonWriter.write("\n "); // 518, 5 TableName snapshotTable = TableName.valueOf(snapshotDesc.getTable()); // 521, 5 jamonWriter.write("\n \n \n \n \n "); } // 527, 12 jamonWriter.write("\n

"); // 528, 8 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshots.size()), jamonWriter); // 528, 30 jamonWriter.write(" snapshot(s) in set. [Snapshot Storefile stats]

\n
Snapshot NameTableCreation Time
"); // 522, 70 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getName()), jamonWriter); // 522, 98 jamonWriter.write(" "); // 523, 76 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotTable.getNameAsString()), jamonWriter); // 523, 113 jamonWriter.write("\n "); // 525, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(snapshotDesc.getCreationTime())), jamonWriter); // 525, 59 jamonWriter.write("
\n"); } // 530, 7 jamonWriter.write("\n"); } // 387, 1 private void __jamon_innerUnit__catalogTables(final java.io.Writer jamonWriter) throws java.io.IOException { // 388, 1 HTableDescriptor[] sysTables = null; try (Admin admin = master.getConnection().getAdmin()) { sysTables = master.isInitialized() ? admin.listTableDescriptorsByNamespace( NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR) : null; } // 395, 1 if ((sysTables != null && sysTables.length > 0)) { // 395, 51 jamonWriter.write("\n\n\n \n "); // 399, 5 if ((frags != null) ) { // 399, 28 jamonWriter.write("\n \n "); } // 401, 11 jamonWriter.write("\n \n\n"); // 404, 1 for (HTableDescriptor systemTable : sysTables) { // 404, 49 jamonWriter.write("\n\n"); // 406, 1 TableName tableName = systemTable.getTableName(); // 407, 5 jamonWriter.write("\n "); // 408, 5 if ((frags != null)) { // 408, 27 jamonWriter.write("\n \n "); } // 411, 11 jamonWriter.write("\n "); // 412, 5 String description = null; if (tableName.equals(TableName.META_TABLE_NAME)){ description = "The hbase:meta table holds references to all User Table regions."; } else if (tableName.equals(CanaryTool.DEFAULT_WRITE_TABLE_NAME)){ description = "The hbase:canary table is used to sniff the write availbility of" + " each regionserver."; } else if (tableName.equals(AccessControlLists.ACL_TABLE_NAME)){ description = "The hbase:acl table holds information about acl"; } else if (tableName.equals(VisibilityConstants.LABELS_TABLE_NAME)){ description = "The hbase:labels table holds information about visibility labels."; } else if (tableName.equals(TableName.NAMESPACE_TABLE_NAME)){ description = "The hbase:namespace table holds information about namespaces."; } else if (tableName.equals(QuotaUtil.QUOTA_TABLE_NAME)){ description = "The hbase:quota table holds quota information about number" + " or size of requests in a given time frame."; } else if (tableName.equals(TableName.valueOf("hbase:rsgroup"))){ description = "The hbase:rsgroup table holds information about regionserver groups"; } // 431, 5 jamonWriter.write("\n\n"); } // 433, 8 jamonWriter.write("\n
Table NameFrag.Description
"); // 407, 50 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName), jamonWriter); // 407, 65 jamonWriter.write(""); // 409, 28 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get(tableName.getNameAsString()) != null ? frags.get(tableName.getNameAsString()) .intValue() + "%" : "n/a"), jamonWriter); // 410, 37 jamonWriter.write(""); // 431, 9 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(description), jamonWriter); // 431, 26 jamonWriter.write("
\n"); } // 435, 7 jamonWriter.write("\n"); } // 438, 1 private void __jamon_innerUnit__userTables(final java.io.Writer jamonWriter) throws java.io.IOException { // 439, 1 HTableDescriptor[] tables = null; try (Admin admin = master.getConnection().getAdmin()) { tables = master.isInitialized() ? admin.listTables() : null; } // 445, 1 if ((tables != null && tables.length > 0)) { // 445, 45 jamonWriter.write("\n\n\n \n \n \n "); // 451, 9 if ((frags != null) ) { // 451, 32 jamonWriter.write("\n \n "); } // 453, 15 jamonWriter.write("\n \n \n \n \n \n \n \n\n\n "); // 463, 5 for (HTableDescriptor htDesc : tables) { // 463, 45 jamonWriter.write("\n "); // 464, 5 TableName tableName = htDesc.getTableName(); Map> tableRegions = master.getAssignmentManager().getRegionStates() .getRegionByStateOfTable(tableName); int openRegionsCount = tableRegions.get(RegionState.State.OPEN).size(); int offlineRegionsCount = tableRegions.get(RegionState.State.OFFLINE).size(); int splitRegionsCount = tableRegions.get(RegionState.State.SPLIT).size(); int failedRegionsCount = tableRegions.get(RegionState.State.FAILED_OPEN).size() + tableRegions.get(RegionState.State.FAILED_CLOSE).size(); int otherRegionsCount = 0; for (List list: tableRegions.values()) { otherRegionsCount += list.size(); } // now subtract known states otherRegionsCount = otherRegionsCount - openRegionsCount - failedRegionsCount - offlineRegionsCount - splitRegionsCount; // 483, 5 jamonWriter.write("\n \n \n "); // 486, 9 if ((frags != null) ) { // 486, 32 jamonWriter.write("\n \n "); } // 488, 15 jamonWriter.write("\n \n \n \n \n \n \n \n "); } // 496, 12 jamonWriter.write("\n

"); // 497, 8 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tables.length), jamonWriter); // 497, 27 jamonWriter.write(" table(s) in set. [Details]

\n\n
NamespaceTable NameFrag.Online RegionsOffline RegionsFailed RegionsSplit RegionsOther RegionsDescription
"); // 484, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName.getNamespaceAsString()), jamonWriter); // 484, 51 jamonWriter.write(""); // 485, 70 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName.getQualifierAsString()), jamonWriter); // 485, 108 jamonWriter.write(" "); // 487, 32 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get(tableName.getNameAsString()) != null ? frags.get(tableName.getNameAsString()).intValue() + "%" : "n/a"), jamonWriter); // 487, 150 jamonWriter.write(""); // 489, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openRegionsCount), jamonWriter); // 489, 35 jamonWriter.write(""); // 490, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(offlineRegionsCount), jamonWriter); // 490, 38 jamonWriter.write(""); // 491, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(failedRegionsCount), jamonWriter); // 491, 37 jamonWriter.write(""); // 492, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(splitRegionsCount), jamonWriter); // 492, 36 jamonWriter.write(""); // 493, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(otherRegionsCount), jamonWriter); // 493, 36 jamonWriter.write(""); // 494, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(htDesc.toStringCustomizedValues()), jamonWriter); // 494, 52 jamonWriter.write("
\n"); } // 500, 7 jamonWriter.write("\n"); } // 567, 1 private void __jamon_innerUnit__peerConfigs(final java.io.Writer jamonWriter) throws java.io.IOException { // 568, 1 Map peers = null; try (ReplicationAdmin admin = new ReplicationAdmin(master.getConfiguration())) { peers = admin.listPeerConfigs(); } // 574, 1 jamonWriter.write("\n \n \n \n \n \n \n"); // 581, 1 if ((peers != null && peers.size() > 0)) { // 581, 43 jamonWriter.write("\n "); // 582, 5 for (Map.Entry peer : peers.entrySet() ) { // 582, 78 jamonWriter.write("\n "); // 583, 5 String peerId = peer.getKey(); ReplicationPeerConfig peerConfig = peer.getValue(); // 587, 5 jamonWriter.write("\n \n \n \n \n \n "); } // 595, 12 jamonWriter.write("\n"); } // 596, 7 jamonWriter.write("\n\n
Peer IdCluster KeyBandwidthTable Cfs
"); // 588, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerId), jamonWriter); // 588, 25 jamonWriter.write(""); // 589, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getClusterKey()), jamonWriter); // 589, 45 jamonWriter.write(""); // 590, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getBandwidth() == 0? "UNLIMITED" : StringUtils.humanReadableInt(peerConfig.getBandwidth())), jamonWriter); // 590, 120 jamonWriter.write("\n "); // 592, 12 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getTableCFsMap() == null ? "" : ReplicationSerDeHelper.convertToString(peerConfig.getTableCFsMap()).replaceAll(";", "; ")), jamonWriter); // 592, 150 jamonWriter.write("\n
Total: "); // 597, 16 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf((peers != null) ? peers.size() : 0), jamonWriter); // 597, 56 jamonWriter.write("
\n"); } // 534, 1 private void __jamon_innerUnit__deadRegionServers(final java.io.Writer jamonWriter) throws java.io.IOException { // 536, 1 if ((deadServers != null && deadServers.size() > 0)) { // 536, 55 jamonWriter.write("\n

Dead Region Servers

\n\n \n \n \n \n \n "); // 544, 5 DeadServer deadServerUtil = master.getServerManager().getDeadServers(); ServerName [] deadServerNames = deadServers.toArray(new ServerName[deadServers.size()]); Arrays.sort(deadServerNames); for (ServerName deadServerName: deadServerNames) { // 550, 5 jamonWriter.write("\n \t\n \n \n \n "); // 555, 5 } // 558, 5 jamonWriter.write("\n \n \n \n \n
ServerNameStop time
"); // 552, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerName), jamonWriter); // 552, 33 jamonWriter.write(""); // 553, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerUtil.getTimeOfDeath(deadServerName)), jamonWriter); // 553, 64 jamonWriter.write("
Total: servers: "); // 560, 22 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServers.size()), jamonWriter); // 560, 46 jamonWriter.write("
\n"); } // 564, 7 jamonWriter.write("\n"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy