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

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

There is a newer version: 3.0.0-beta-1
Show 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 java.io.IOException;
// 34, 1
import org.apache.hadoop.hbase.client.replication.ReplicationPeerConfigUtil;
// 35, 1
import org.apache.hadoop.hbase.client.RegionInfo;
// 36, 1
import org.apache.hadoop.hbase.client.TableDescriptor;
// 37, 1
import org.apache.hadoop.hbase.replication.ReplicationPeerConfig;
// 38, 1
import org.apache.hadoop.hbase.replication.ReplicationPeerDescription;
// 39, 1
import org.apache.hadoop.hbase.HBaseConfiguration;
// 40, 1
import org.apache.hadoop.hbase.HConstants;
// 41, 1
import org.apache.hadoop.hbase.HTableDescriptor;
// 42, 1
import org.apache.hadoop.hbase.NamespaceDescriptor;
// 43, 1
import org.apache.hadoop.hbase.ServerName;
// 44, 1
import org.apache.hadoop.hbase.TableName;
// 45, 1
import org.apache.hadoop.hbase.client.Admin;
// 46, 1
import org.apache.hadoop.hbase.client.MasterSwitchType;
// 47, 1
import org.apache.hadoop.hbase.client.TableState;
// 48, 1
import org.apache.hadoop.hbase.master.assignment.AssignmentManager;
// 49, 1
import org.apache.hadoop.hbase.master.DeadServer;
// 50, 1
import org.apache.hadoop.hbase.master.HMaster;
// 51, 1
import org.apache.hadoop.hbase.master.RegionState;
// 52, 1
import org.apache.hadoop.hbase.master.ServerManager;
// 53, 1
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
// 54, 1
import org.apache.hadoop.hbase.quotas.QuotaUtil;
// 55, 1
import org.apache.hadoop.hbase.security.access.PermissionStorage;
// 56, 1
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants;
// 57, 1
import org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription;
// 58, 1
import org.apache.hadoop.hbase.tool.CanaryTool;
// 59, 1
import org.apache.hadoop.hbase.util.Bytes;
// 60, 1
import org.apache.hadoop.hbase.util.CommonFSUtils;
// 61, 1
import org.apache.hadoop.hbase.util.JvmVersion;
// 62, 1
import org.apache.hadoop.hbase.util.PrettyPrinter;
// 63, 1
import org.apache.hadoop.util.StringUtils;

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 Set deadServers;
  private final String filter;
  private final String format;
  private final Map frags;
  private final ServerName metaLocation;
  private final ServerManager serverManager;
  private final List servers;
  // 75, 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(); } // 102, 1 public static String getUserTables(HMaster master, List tables){ if (master.isInitialized()){ try { Map descriptorMap = master.getTableDescriptors().getAll(); if (descriptorMap != null) { for (TableDescriptor desc : descriptorMap.values()) { if (!desc.getTableName().isSystemTable()) { tables.add(desc); } } } } catch (IOException e) { return "Got user tables error, " + e.getMessage(); } } return null; } 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.getDeadServers__IsNotDefault()) { p_implData.setDeadServers(null); } if(! p_implData.getFilter__IsNotDefault()) { p_implData.setFilter("general"); } if(! p_implData.getFormat__IsNotDefault()) { p_implData.setFormat("html"); } if(! p_implData.getFrags__IsNotDefault()) { p_implData.setFrags(null); } if(! p_implData.getMetaLocation__IsNotDefault()) { p_implData.setMetaLocation(null); } if(! p_implData.getServerManager__IsNotDefault()) { p_implData.setServerManager(null); } if(! p_implData.getServers__IsNotDefault()) { p_implData.setServers(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(); deadServers = p_implData.getDeadServers(); filter = p_implData.getFilter(); format = p_implData.getFormat(); frags = p_implData.getFrags(); metaLocation = p_implData.getMetaLocation(); serverManager = p_implData.getServerManager(); servers = p_implData.getServers(); } @Override public void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException { // 66, 1 if (format.equals("json") ) { // 66, 30 jamonWriter.write("\n "); // 67, 3 { org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl __jamon__var_7 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager()); __jamon__var_7.setFilter(filter); __jamon__var_7.setFormat("json" ); __jamon__var_7.renderNoFlush(jamonWriter); } // 67, 68 jamonWriter.write("\n "); // 68, 3 return; } // 69, 7 jamonWriter.write("\n"); // 70, 1 ServerManager serverManager = master.getServerManager(); AssignmentManager assignmentManager = master.getAssignmentManager(); // 122, 1 jamonWriter.write("\n\n\n \n \n "); // 127, 12 if (master.isActiveMaster() ) { // 127, 43 jamonWriter.write("Master: "); } // 127, 51 else { // 127, 58 jamonWriter.write("Backup Master: "); } // 127, 79 jamonWriter.write("\n "); // 128, 5 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerName().getHostname()), jamonWriter); // 128, 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"); // 174, 2 if (master.isActiveMaster() ) { // 174, 33 jamonWriter.write("\n
\n
\n

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

\n
\n
\n\n
\n \n "); // 183, 9 if (JvmVersion.isBadJvmVersion() ) { // 183, 45 jamonWriter.write("\n
\n Your current JVM version "); // 185, 36 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(System.getProperty("java.version")), jamonWriter); // 185, 76 jamonWriter.write(" is known to be\n unstable with HBase. Please see the\n HBase Reference Guide\n for details.\n
\n "); } // 190, 15 jamonWriter.write("\n "); // 191, 9 if (master.isInitialized() && !catalogJanitorEnabled ) { // 191, 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 "); } // 196, 15 jamonWriter.write("\n "); // 197, 9 if (master.isInMaintenanceMode() ) { // 197, 45 jamonWriter.write("\n
\n Your Master is in maintenance mode. This is because hbase.master.maintenance_mode is\n set to true. Under the maintenance mode, no quota or no Master coprocessor is loaded.\n
\n "); } // 202, 15 jamonWriter.write("\n "); // 203, 9 if (!master.isBalancerOn() ) { // 203, 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 "); } // 209, 15 jamonWriter.write("\n "); // 210, 9 if (!master.isSplitOrMergeEnabled(MasterSwitchType.SPLIT) ) { // 210, 70 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 "); } // 216, 15 jamonWriter.write("\n "); // 217, 9 if (!master.isSplitOrMergeEnabled(MasterSwitchType.MERGE) ) { // 217, 70 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 "); } // 223, 15 jamonWriter.write("\n "); // 224, 9 if (master.getAssignmentManager() != null ) { // 224, 54 jamonWriter.write("\n "); // 225, 11 { org.apache.hadoop.hbase.tmpl.master.AssignmentManagerStatusTmpl __jamon__var_8 = new org.apache.hadoop.hbase.tmpl.master.AssignmentManagerStatusTmpl(this.getTemplateManager()); __jamon__var_8.renderNoFlush(jamonWriter, master.getAssignmentManager()); } // 225, 92 jamonWriter.write("\n "); } // 226, 15 jamonWriter.write("\n "); // 227, 9 if (!master.isInMaintenanceMode() && master.getMasterCoprocessorHost() != null ) { // 227, 91 jamonWriter.write("\n "); // 228, 11 if (master.getMasterCoprocessorHost().findCoprocessor("RSGroupAdminEndpoint") != null && serverManager.getOnlineServersList().size() > 0 ) { // 229, 63 jamonWriter.write("\n
\n

RSGroup

\n "); // 232, 15 { org.apache.hadoop.hbase.tmpl.master.RSGroupListTmpl __jamon__var_9 = new org.apache.hadoop.hbase.tmpl.master.RSGroupListTmpl(this.getTemplateManager()); __jamon__var_9.renderNoFlush(jamonWriter, master, serverManager); } // 232, 81 jamonWriter.write("\n
\n "); } // 234, 17 jamonWriter.write("\n "); } // 235, 15 jamonWriter.write("\n
\n

Region Servers

\n "); // 238, 13 { org.apache.hadoop.hbase.tmpl.master.RegionServerListTmpl __jamon__var_10 = new org.apache.hadoop.hbase.tmpl.master.RegionServerListTmpl(this.getTemplateManager()); __jamon__var_10.setServers(servers ); __jamon__var_10.renderNoFlush(jamonWriter, master); } // 238, 74 jamonWriter.write("\n\n "); // 240, 13 if ((deadServers != null) ) { // 240, 42 jamonWriter.write("\n "); // 241, 17 { // 241, 17 __jamon_innerUnit__deadRegionServers(jamonWriter); } // 241, 40 jamonWriter.write("\n "); } // 242, 19 jamonWriter.write("\n
\n
\n "); // 245, 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 ); } // 245, 58 jamonWriter.write("\n
\n
\n

Tables

\n
\n \n
\n
\n "); // 263, 25 if ((metaLocation != null) ) { // 263, 55 jamonWriter.write("\n "); // 264, 29 { // 264, 29 __jamon_innerUnit__userTables(jamonWriter); } // 264, 45 jamonWriter.write("\n "); } // 265, 31 jamonWriter.write("\n
\n
\n "); // 268, 25 if ((metaLocation != null) ) { // 268, 55 jamonWriter.write("\n "); // 269, 29 { // 269, 29 __jamon_innerUnit__catalogTables(jamonWriter); } // 269, 48 jamonWriter.write("\n "); } // 270, 31 jamonWriter.write("\n
\n
\n "); // 273, 25 { // 273, 25 __jamon_innerUnit__userSnapshots(jamonWriter); } // 273, 44 jamonWriter.write("\n
\n
\n
\n
\n
\n

Peers

\n "); // 280, 13 { // 280, 13 __jamon_innerUnit__peerConfigs(jamonWriter); } // 280, 30 jamonWriter.write("\n
\n\t"); } // 282, 2 else { // 282, 9 jamonWriter.write("\n
\n "); // 284, 13 { org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl __jamon__var_12 = new org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl(this.getTemplateManager()); __jamon__var_12.renderNoFlush(jamonWriter, master ); } // 284, 58 jamonWriter.write("\n
\n\t"); } // 286, 8 jamonWriter.write("\n\n\n
\n "); // 290, 13 { org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl __jamon__var_13 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager()); __jamon__var_13.setFilter(filter); __jamon__var_13.setParent("/master-status" ); __jamon__var_13.renderNoFlush(jamonWriter); } // 290, 88 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 \n \n \n \n "); // 371, 17 if (master.isActiveMaster() ) { // 371, 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 "); // 388, 18 if (frags != null ) { // 388, 39 jamonWriter.write("\n\t \n\t \n\t \n\t \n\t \n\t "); } // 394, 24 jamonWriter.write("\n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n "); } // 406, 23 jamonWriter.write("\n
Attribute NameValueDescription
JVM Version"); // 303, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(JvmVersion.getVersion()), jamonWriter); // 303, 54 jamonWriter.write("JVM vendor and version
HBase Version"); // 308, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getVersion()), jamonWriter); // 308, 84 jamonWriter.write(", revision="); // 308, 95 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getRevision()), jamonWriter); // 308, 155 jamonWriter.write("HBase version and revision
HBase Compiled"); // 312, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getDate()), jamonWriter); // 312, 81 jamonWriter.write(", "); // 312, 83 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getUser()), jamonWriter); // 312, 139 jamonWriter.write("When HBase version was compiled and by whom
HBase Source Checksum"); // 317, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getSrcChecksum()), jamonWriter); // 317, 88 jamonWriter.write("HBase source SHA512 checksum
Hadoop Version"); // 322, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getVersion()), jamonWriter); // 322, 78 jamonWriter.write(", revision="); // 322, 89 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getRevision()), jamonWriter); // 322, 143 jamonWriter.write("Hadoop version and revision
Hadoop Compiled"); // 327, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getDate()), jamonWriter); // 327, 75 jamonWriter.write(", "); // 327, 77 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getUser()), jamonWriter); // 327, 127 jamonWriter.write("When Hadoop version was compiled and by whom
Hadoop Source Checksum"); // 332, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getSrcChecksum()), jamonWriter); // 332, 82 jamonWriter.write("Hadoop source MD5 checksum
ZooKeeper Client Version"); // 337, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getVersion()), jamonWriter); // 337, 72 jamonWriter.write(", revision="); // 337, 83 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getRevisionHash()), jamonWriter); // 337, 135 jamonWriter.write("ZooKeeper client version and revision hash
ZooKeeper Client Compiled"); // 342, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getBuildDate()), jamonWriter); // 342, 74 jamonWriter.write("When ZooKeeper client version was compiled
ZooKeeper Quorum "); // 348, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter); // 348, 48 jamonWriter.write(" Addresses of all registered ZK servers. For more, see zk dump.
ZooKeeper Base Path "); // 353, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getZooKeeper().getZNodePaths().baseZNode), jamonWriter); // 353, 79 jamonWriter.write("Root node of this cluster in ZK.
Cluster Key "); // 358, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter); // 358, 48 jamonWriter.write(":"); // 358, 49 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getZooKeeper().getZNodePaths().baseZNode), jamonWriter); // 358, 102 jamonWriter.write("Key to add this cluster as a peer for replication. Use 'help \"add_peer\"' in the shell for details.
HBase Root Directory"); // 363, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(CommonFSUtils.getRootDir(master.getConfiguration()).toString()), jamonWriter); // 363, 93 jamonWriter.write("Location of HBase home directory
HMaster Start Time"); // 368, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterStartTime())), jamonWriter); // 368, 68 jamonWriter.write("Date stamp of when this HMaster was started
HMaster Active Time"); // 374, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterActiveTime())), jamonWriter); // 374, 70 jamonWriter.write("Date stamp of when this HMaster became active
HBase Cluster ID"); // 379, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getClusterId() != null ? master.getClusterId() : "Not set"), jamonWriter); // 379, 97 jamonWriter.write("Unique identifier generated for each HBase cluster
Load average"); // 384, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerManager() == null ? "0.00" : StringUtils.limitDecimalTo2(master.getServerManager().getAverageLoad())), jamonWriter); // 385, 98 jamonWriter.write("Average number of regions per regionserver. Naive computation.
Fragmentation"); // 391, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get("-TOTAL-") != null ? frags.get("-TOTAL-").intValue() + "%" : "n/a"), jamonWriter); // 391, 108 jamonWriter.write("Overall fragmentation of all tables, including hbase:meta
Coprocessors"); // 397, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getMasterCoprocessorHost() == null ? "[]" : java.util.Arrays.toString(master.getMasterCoprocessors())), jamonWriter); // 398, 84 jamonWriter.write("Coprocessors currently loaded by the master
LoadBalancer"); // 403, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getLoadBalancerClassName()), jamonWriter); // 403, 65 jamonWriter.write("LoadBalancer to be used in the Master
\n
\n
\n
\n\n \n \n \n \n \n \n \n \n\n\n"); } // 529, 1 private void __jamon_innerUnit__catalogTables(final java.io.Writer jamonWriter) throws java.io.IOException { // 530, 1 List sysTables = master.isInitialized() ? master.listTableDescriptorsByNamespace(NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR) : null; // 534, 1 if ((sysTables != null && sysTables.size() > 0)) { // 534, 51 jamonWriter.write("\n\n\n \n "); // 538, 5 if ((frags != null) ) { // 538, 28 jamonWriter.write("\n \n "); } // 540, 11 jamonWriter.write("\n \n\n"); // 543, 1 for (TableDescriptor systemTable : sysTables) { // 543, 48 jamonWriter.write("\n\n"); // 545, 1 TableName tableName = systemTable.getTableName(); // 546, 5 jamonWriter.write("\n "); // 547, 5 if ((frags != null)) { // 547, 27 jamonWriter.write("\n \n "); } // 550, 11 jamonWriter.write("\n "); // 551, 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(PermissionStorage.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."; } else if (tableName.equals(TableName.valueOf("hbase:replication"))) { description = "The hbase:replication table tracks cross cluster replication through " + "WAL file offsets."; } // 573, 5 jamonWriter.write("\n\n"); } // 575, 8 jamonWriter.write("\n
Table NameFrag.Description
"); // 546, 50 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName), jamonWriter); // 546, 65 jamonWriter.write(""); // 548, 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); // 549, 37 jamonWriter.write(""); // 573, 9 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(description), jamonWriter); // 573, 26 jamonWriter.write("
\n"); } // 577, 7 jamonWriter.write("\n"); } // 700, 1 private void __jamon_innerUnit__deadRegionServers(final java.io.Writer jamonWriter) throws java.io.IOException { // 702, 1 if ((deadServers != null && deadServers.size() > 0)) { // 702, 55 jamonWriter.write("\n

Dead Region Servers

\n\n \n \n \n \n \n "); // 710, 5 DeadServer deadServerUtil = master.getServerManager().getDeadServers(); ServerName [] deadServerNames = deadServers.toArray(new ServerName[deadServers.size()]); Arrays.sort(deadServerNames); for (ServerName deadServerName: deadServerNames) { // 716, 5 jamonWriter.write("\n \t\n \n \n \n "); // 721, 5 } // 724, 5 jamonWriter.write("\n \n \n \n \n
ServerNameStop time
"); // 718, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerName), jamonWriter); // 718, 33 jamonWriter.write(""); // 719, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerUtil.getTimeOfDeath(deadServerName)), jamonWriter); // 719, 64 jamonWriter.write("
Total: servers: "); // 726, 22 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServers.size()), jamonWriter); // 726, 46 jamonWriter.write("
\n"); } // 730, 7 jamonWriter.write("\n"); } // 733, 1 private void __jamon_innerUnit__peerConfigs(final java.io.Writer jamonWriter) throws java.io.IOException { // 734, 1 List peers = null; if (master.getReplicationPeerManager() != null) { peers = master.getReplicationPeerManager().listPeers(null); } // 740, 1 jamonWriter.write("\n \n \n \n \n \n \n \n \n \n \n \n \n \n"); // 754, 1 if ((peers != null && peers.size() > 0)) { // 754, 43 jamonWriter.write("\n "); // 755, 5 for (ReplicationPeerDescription peer : peers ) { // 755, 53 jamonWriter.write("\n "); // 756, 5 String peerId = peer.getPeerId(); ReplicationPeerConfig peerConfig = peer.getPeerConfig(); // 760, 5 jamonWriter.write("\n \n \n \n \n \n \n \n \n \n \n \n \n "); } // 781, 12 jamonWriter.write("\n"); } // 782, 7 jamonWriter.write("\n\n
Peer IdCluster KeyEndpointStateIsSerialBandwidthReplicateAllNamespacesExclude NamespacesTable CfsExclude Table Cfs
"); // 761, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerId), jamonWriter); // 761, 25 jamonWriter.write(""); // 762, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getClusterKey()), jamonWriter); // 762, 45 jamonWriter.write(""); // 763, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getReplicationEndpointImpl()), jamonWriter); // 763, 58 jamonWriter.write(""); // 764, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peer.isEnabled() ? "ENABLED" : "DISABLED"), jamonWriter); // 764, 60 jamonWriter.write(""); // 765, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.isSerial()), jamonWriter); // 765, 40 jamonWriter.write(""); // 766, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getBandwidth() == 0? "UNLIMITED" : StringUtils.humanReadableInt(peerConfig.getBandwidth())), jamonWriter); // 766, 120 jamonWriter.write(""); // 767, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.replicateAllUserTables()), jamonWriter); // 767, 54 jamonWriter.write("\n "); // 769, 12 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getNamespaces() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getNamespaces()).replaceAll(";", "; ")), jamonWriter); // 769, 151 jamonWriter.write("\n \n "); // 772, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getExcludeNamespaces() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getExcludeNamespaces()).replaceAll(";", "; ")), jamonWriter); // 772, 166 jamonWriter.write("\n \n "); // 775, 12 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getTableCFsMap() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getTableCFsMap()).replaceAll(";", "; ")), jamonWriter); // 775, 153 jamonWriter.write("\n \n "); // 778, 12 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getExcludeTableCFsMap() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getExcludeTableCFsMap()).replaceAll(";", "; ")), jamonWriter); // 778, 167 jamonWriter.write("\n
Total: "); // 783, 16 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf((peers != null) ? peers.size() : 0), jamonWriter); // 783, 56 jamonWriter.write("
\n"); } // 664, 1 private void __jamon_innerUnit__userSnapshots(final java.io.Writer jamonWriter) throws java.io.IOException { // 665, 1 List snapshots = master.isInitialized() ? master.getSnapshotManager().getCompletedSnapshots() : null; // 669, 1 if ((snapshots != null && snapshots.size() > 0)) { // 669, 51 jamonWriter.write("\n\n \n \n \n \n \n \n \n "); // 678, 5 for (SnapshotDescription snapshotDesc : snapshots) { // 678, 57 jamonWriter.write("\n "); // 679, 5 TableName snapshotTable = TableName.valueOf(snapshotDesc.getTable()); // 682, 5 jamonWriter.write("\n \n \n \n \n\n \n \n "); } // 693, 12 jamonWriter.write("\n

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

\n
Snapshot NameTableCreation TimeOwnerTTL
"); // 683, 70 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getName()), jamonWriter); // 683, 98 jamonWriter.write(" "); // 684, 76 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotTable.getNameAsString()), jamonWriter); // 684, 113 jamonWriter.write("\n "); // 686, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(snapshotDesc.getCreationTime())), jamonWriter); // 686, 59 jamonWriter.write(""); // 687, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getOwner()), jamonWriter); // 687, 42 jamonWriter.write("\n "); // 690, 11 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getTtl() == 0 ? "FOREVER": PrettyPrinter.format(String.valueOf(snapshotDesc.getTtl()), PrettyPrinter.Unit.TIME_INTERVAL)), jamonWriter); // 690, 150 jamonWriter.write("\n
\n"); } // 696, 7 jamonWriter.write("\n"); } // 580, 1 private void __jamon_innerUnit__userTables(final java.io.Writer jamonWriter) throws java.io.IOException { // 581, 1 List tables = new ArrayList(); String errorMessage = getUserTables(master, tables); // 585, 1 if ((tables.size() == 0 && errorMessage != null)) { // 585, 52 jamonWriter.write("\n

"); // 586, 5 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(errorMessage), jamonWriter); // 586, 23 jamonWriter.write("

\n"); } // 587, 7 jamonWriter.write("\n\n"); // 589, 1 if ((tables != null && tables.size() > 0)) { // 589, 45 jamonWriter.write("\n\n\n \n \n \n "); // 595, 9 if ((frags != null) ) { // 595, 32 jamonWriter.write("\n \n "); } // 597, 15 jamonWriter.write("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n "); // 614, 5 for (TableDescriptor desc : tables) { // 614, 42 jamonWriter.write("\n "); // 615, 5 HTableDescriptor htDesc = new HTableDescriptor(desc); TableName tableName = htDesc.getTableName(); TableState tableState = master.getTableStateManager().getTableState(tableName); Map> tableRegions = master.getAssignmentManager().getRegionStates() .getRegionByStateOfTable(tableName); int openRegionsCount = tableRegions.get(RegionState.State.OPEN).size(); int openingRegionsCount = tableRegions.get(RegionState.State.OPENING).size(); int closedRegionsCount = tableRegions.get(RegionState.State.CLOSED).size(); int closingRegionsCount = tableRegions.get(RegionState.State.CLOSING).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 - openingRegionsCount - closedRegionsCount - closingRegionsCount; // 640, 5 jamonWriter.write("\n \n \n "); // 643, 9 if ((frags != null) ) { // 643, 32 jamonWriter.write("\n \n "); } // 645, 15 jamonWriter.write("\n \n \n "); // 648, 9 if ((openingRegionsCount > 0) ) { // 648, 42 jamonWriter.write(" "); } // 648, 152 else { // 648, 159 jamonWriter.write(" "); } // 648, 200 jamonWriter.write("\n \n "); // 650, 9 if ((closingRegionsCount > 0) ) { // 650, 42 jamonWriter.write(" "); } // 650, 152 else { // 650, 159 jamonWriter.write(" "); } // 650, 200 jamonWriter.write("\n \n \n \n \n \n \n "); } // 657, 12 jamonWriter.write("\n

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

\n\n
NamespaceNameFrag.StateRegionsDescription
OPENOPENINGCLOSEDCLOSINGOFFLINEFAILEDSPLITOther
"); // 641, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName.getNamespaceAsString()), jamonWriter); // 641, 51 jamonWriter.write(""); // 642, 70 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName.getQualifierAsString()), jamonWriter); // 642, 108 jamonWriter.write(" "); // 644, 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); // 644, 150 jamonWriter.write(""); // 646, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableState.getState()), jamonWriter); // 646, 40 jamonWriter.write(""); // 647, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openRegionsCount), jamonWriter); // 647, 35 jamonWriter.write(""); // 648, 121 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openingRegionsCount), jamonWriter); // 648, 146 jamonWriter.write(""); // 648, 163 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openingRegionsCount), jamonWriter); // 648, 188 jamonWriter.write(""); // 649, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(closedRegionsCount), jamonWriter); // 649, 37 jamonWriter.write(""); // 650, 121 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(closingRegionsCount), jamonWriter); // 650, 146 jamonWriter.write(""); // 650, 163 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(closingRegionsCount), jamonWriter); // 650, 188 jamonWriter.write(""); // 651, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(offlineRegionsCount), jamonWriter); // 651, 38 jamonWriter.write(""); // 652, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(failedRegionsCount), jamonWriter); // 652, 37 jamonWriter.write(""); // 653, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(splitRegionsCount), jamonWriter); // 653, 36 jamonWriter.write(""); // 654, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(otherRegionsCount), jamonWriter); // 654, 36 jamonWriter.write(""); // 655, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(htDesc.toStringCustomizedValues()), jamonWriter); // 655, 52 jamonWriter.write("
\n"); } // 661, 7 jamonWriter.write("\n"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy