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
// /home/taklwu/hbase-rm/output/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.net.URLEncoder;
// 34, 1
import java.io.IOException;
// 35, 1
import org.apache.hadoop.hbase.client.replication.ReplicationPeerConfigUtil;
// 36, 1
import org.apache.hadoop.hbase.client.RegionInfo;
// 37, 1
import org.apache.hadoop.hbase.client.TableDescriptor;
// 38, 1
import org.apache.hadoop.hbase.replication.ReplicationPeerConfig;
// 39, 1
import org.apache.hadoop.hbase.replication.ReplicationPeerDescription;
// 40, 1
import org.apache.hadoop.hbase.HBaseConfiguration;
// 41, 1
import org.apache.hadoop.hbase.HConstants;
// 42, 1
import org.apache.hadoop.hbase.HTableDescriptor;
// 43, 1
import org.apache.hadoop.hbase.NamespaceDescriptor;
// 44, 1
import org.apache.hadoop.hbase.ServerName;
// 45, 1
import org.apache.hadoop.hbase.TableName;
// 46, 1
import org.apache.hadoop.hbase.client.Admin;
// 47, 1
import org.apache.hadoop.hbase.client.MasterSwitchType;
// 48, 1
import org.apache.hadoop.hbase.client.TableState;
// 49, 1
import org.apache.hadoop.hbase.master.assignment.AssignmentManager;
// 50, 1
import org.apache.hadoop.hbase.master.DeadServer;
// 51, 1
import org.apache.hadoop.hbase.master.HMaster;
// 52, 1
import org.apache.hadoop.hbase.master.RegionState;
// 53, 1
import org.apache.hadoop.hbase.master.ServerManager;
// 54, 1
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
// 55, 1
import org.apache.hadoop.hbase.quotas.QuotaUtil;
// 56, 1
import org.apache.hadoop.hbase.security.access.PermissionStorage;
// 57, 1
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants;
// 58, 1
import org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription;
// 59, 1
import org.apache.hadoop.hbase.tool.CanaryTool;
// 60, 1
import org.apache.hadoop.hbase.util.Bytes;
// 61, 1
import org.apache.hadoop.hbase.util.CommonFSUtils;
// 62, 1
import org.apache.hadoop.hbase.util.JvmVersion;
// 63, 1
import org.apache.hadoop.hbase.util.PrettyPrinter;
// 64, 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;
  // 76, 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(); } // 103, 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 { // 67, 1 if (format.equals("json") ) { // 67, 30 jamonWriter.write("\n "); // 68, 3 { org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl __jamon__var_0 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager()); __jamon__var_0.setFilter(filter); __jamon__var_0.setFormat("json" ); __jamon__var_0.renderNoFlush(jamonWriter); } // 68, 68 jamonWriter.write("\n "); // 69, 3 return; } // 70, 7 jamonWriter.write("\n"); // 71, 1 ServerManager serverManager = master.getServerManager(); AssignmentManager assignmentManager = master.getAssignmentManager(); // 123, 1 jamonWriter.write("\n\n\n \n \n "); // 128, 12 if (master.isActiveMaster() ) { // 128, 43 jamonWriter.write("Master: "); } // 128, 51 else { // 128, 58 jamonWriter.write("Backup Master: "); } // 128, 79 jamonWriter.write("\n "); // 129, 5 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerName().getHostname()), jamonWriter); // 129, 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"); // 177, 2 if (master.isActiveMaster() ) { // 177, 33 jamonWriter.write("\n
\n
\n

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

\n
\n
\n\n
\n \n "); // 186, 9 if (JvmVersion.isBadJvmVersion() ) { // 186, 45 jamonWriter.write("\n
\n Your current JVM version "); // 188, 36 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(System.getProperty("java.version")), jamonWriter); // 188, 76 jamonWriter.write(" is known to be\n unstable with HBase. Please see the\n HBase Reference Guide\n for details.\n
\n "); } // 193, 15 jamonWriter.write("\n "); // 194, 9 if (master.isInitialized() && !catalogJanitorEnabled ) { // 194, 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 "); } // 199, 15 jamonWriter.write("\n "); // 200, 9 if (master.isInMaintenanceMode() ) { // 200, 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 "); } // 205, 15 jamonWriter.write("\n "); // 206, 9 if (!master.isBalancerOn() ) { // 206, 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 "); } // 212, 15 jamonWriter.write("\n "); // 213, 9 if (!master.isSplitOrMergeEnabled(MasterSwitchType.SPLIT) ) { // 213, 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 "); } // 219, 15 jamonWriter.write("\n "); // 220, 9 if (!master.isSplitOrMergeEnabled(MasterSwitchType.MERGE) ) { // 220, 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 "); } // 226, 15 jamonWriter.write("\n "); // 227, 9 if (master.getAssignmentManager() != null ) { // 227, 54 jamonWriter.write("\n "); // 228, 11 { org.apache.hadoop.hbase.tmpl.master.AssignmentManagerStatusTmpl __jamon__var_1 = new org.apache.hadoop.hbase.tmpl.master.AssignmentManagerStatusTmpl(this.getTemplateManager()); __jamon__var_1.renderNoFlush(jamonWriter, master.getAssignmentManager()); } // 228, 92 jamonWriter.write("\n "); } // 229, 15 jamonWriter.write("\n "); // 230, 9 if (!master.isInMaintenanceMode() && master.getMasterCoprocessorHost() != null ) { // 230, 91 jamonWriter.write("\n "); // 231, 11 if (master.getMasterCoprocessorHost().findCoprocessor("RSGroupAdminEndpoint") != null && serverManager.getOnlineServersList().size() > 0 ) { // 232, 63 jamonWriter.write("\n
\n

RSGroup

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

Region Servers

\n "); // 241, 13 { org.apache.hadoop.hbase.tmpl.master.RegionServerListTmpl __jamon__var_3 = new org.apache.hadoop.hbase.tmpl.master.RegionServerListTmpl(this.getTemplateManager()); __jamon__var_3.setServers(servers ); __jamon__var_3.renderNoFlush(jamonWriter, master); } // 241, 74 jamonWriter.write("\n\n "); // 243, 13 if ((deadServers != null) ) { // 243, 42 jamonWriter.write("\n "); // 244, 17 { // 244, 17 __jamon_innerUnit__deadRegionServers(jamonWriter); } // 244, 40 jamonWriter.write("\n "); } // 245, 19 jamonWriter.write("\n
\n
\n "); // 248, 13 { org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl __jamon__var_4 = new org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl(this.getTemplateManager()); __jamon__var_4.renderNoFlush(jamonWriter, master ); } // 248, 58 jamonWriter.write("\n
\n
\n

Tables

\n
\n \n
\n
\n "); // 266, 25 if ((metaLocation != null) ) { // 266, 55 jamonWriter.write("\n "); // 267, 29 { // 267, 29 __jamon_innerUnit__userTables(jamonWriter); } // 267, 45 jamonWriter.write("\n "); } // 268, 31 jamonWriter.write("\n
\n
\n "); // 271, 25 if ((metaLocation != null) ) { // 271, 55 jamonWriter.write("\n "); // 272, 29 { // 272, 29 __jamon_innerUnit__catalogTables(jamonWriter); } // 272, 48 jamonWriter.write("\n "); } // 273, 31 jamonWriter.write("\n
\n
\n "); // 276, 25 { // 276, 25 __jamon_innerUnit__userSnapshots(jamonWriter); } // 276, 44 jamonWriter.write("\n
\n
\n
\n
\n
\n

Peers

\n "); // 283, 13 { // 283, 13 __jamon_innerUnit__peerConfigs(jamonWriter); } // 283, 30 jamonWriter.write("\n
\n\t"); } // 285, 2 else { // 285, 9 jamonWriter.write("\n
\n "); // 287, 13 { org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl __jamon__var_5 = new org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl(this.getTemplateManager()); __jamon__var_5.renderNoFlush(jamonWriter, master ); } // 287, 58 jamonWriter.write("\n
\n\t"); } // 289, 8 jamonWriter.write("\n\n\n
\n "); // 293, 13 { org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl __jamon__var_6 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager()); __jamon__var_6.setFilter(filter); __jamon__var_6.setParent("/master-status" ); __jamon__var_6.renderNoFlush(jamonWriter); } // 293, 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 "); // 374, 17 if (master.isActiveMaster() ) { // 374, 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 "); // 391, 18 if (frags != null ) { // 391, 39 jamonWriter.write("\n\t \n\t \n\t \n\t \n\t \n\t "); } // 397, 24 jamonWriter.write("\n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n "); } // 409, 23 jamonWriter.write("\n
Attribute NameValueDescription
JVM Version"); // 306, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(JvmVersion.getVersion()), jamonWriter); // 306, 54 jamonWriter.write("JVM vendor and version
HBase Version"); // 311, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getVersion()), jamonWriter); // 311, 84 jamonWriter.write(", revision="); // 311, 95 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getRevision()), jamonWriter); // 311, 155 jamonWriter.write("HBase version and revision
HBase Compiled"); // 315, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getDate()), jamonWriter); // 315, 81 jamonWriter.write(", "); // 315, 83 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getUser()), jamonWriter); // 315, 139 jamonWriter.write("When HBase version was compiled and by whom
HBase Source Checksum"); // 320, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getSrcChecksum()), jamonWriter); // 320, 88 jamonWriter.write("HBase source SHA512 checksum
Hadoop Version"); // 325, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getVersion()), jamonWriter); // 325, 78 jamonWriter.write(", revision="); // 325, 89 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getRevision()), jamonWriter); // 325, 143 jamonWriter.write("Hadoop version and revision
Hadoop Compiled"); // 330, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getDate()), jamonWriter); // 330, 75 jamonWriter.write(", "); // 330, 77 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getUser()), jamonWriter); // 330, 127 jamonWriter.write("When Hadoop version was compiled and by whom
Hadoop Source Checksum"); // 335, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getSrcChecksum()), jamonWriter); // 335, 82 jamonWriter.write("Hadoop source MD5 checksum
ZooKeeper Client Version"); // 340, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getVersion()), jamonWriter); // 340, 72 jamonWriter.write(", revision="); // 340, 83 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getRevisionHash()), jamonWriter); // 340, 135 jamonWriter.write("ZooKeeper client version and revision hash
ZooKeeper Client Compiled"); // 345, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getBuildDate()), jamonWriter); // 345, 74 jamonWriter.write("When ZooKeeper client version was compiled
ZooKeeper Quorum "); // 351, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter); // 351, 48 jamonWriter.write(" Addresses of all registered ZK servers. For more, see zk dump.
ZooKeeper Base Path "); // 356, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getZooKeeper().getZNodePaths().baseZNode), jamonWriter); // 356, 79 jamonWriter.write("Root node of this cluster in ZK.
Cluster Key "); // 361, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter); // 361, 48 jamonWriter.write(":"); // 361, 49 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getZooKeeper().getZNodePaths().baseZNode), jamonWriter); // 361, 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"); // 366, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(CommonFSUtils.getRootDir(master.getConfiguration()).toString()), jamonWriter); // 366, 93 jamonWriter.write("Location of HBase home directory
HMaster Start Time"); // 371, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterStartTime())), jamonWriter); // 371, 68 jamonWriter.write("Date stamp of when this HMaster was started
HMaster Active Time"); // 377, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterActiveTime())), jamonWriter); // 377, 70 jamonWriter.write("Date stamp of when this HMaster became active
HBase Cluster ID"); // 382, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getClusterId() != null ? master.getClusterId() : "Not set"), jamonWriter); // 382, 97 jamonWriter.write("Unique identifier generated for each HBase cluster
Load average"); // 387, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerManager() == null ? "0.00" : StringUtils.limitDecimalTo2(master.getServerManager().getAverageLoad())), jamonWriter); // 388, 98 jamonWriter.write("Average number of regions per regionserver. Naive computation.
Fragmentation"); // 394, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get("-TOTAL-") != null ? frags.get("-TOTAL-").intValue() + "%" : "n/a"), jamonWriter); // 394, 108 jamonWriter.write("Overall fragmentation of all tables, including hbase:meta
Coprocessors"); // 400, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getMasterCoprocessorHost() == null ? "[]" : java.util.Arrays.toString(master.getMasterCoprocessors())), jamonWriter); // 401, 84 jamonWriter.write("Coprocessors currently loaded by the master
LoadBalancer"); // 406, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getLoadBalancerClassName()), jamonWriter); // 406, 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"); } // 544, 1 private void __jamon_innerUnit__catalogTables(final java.io.Writer jamonWriter) throws java.io.IOException { // 545, 1 List sysTables = master.isInitialized() ? master.listTableDescriptorsByNamespace(NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR) : null; // 549, 1 if ((sysTables != null && sysTables.size() > 0)) { // 549, 51 jamonWriter.write("\n\n\n \n "); // 553, 5 if ((frags != null) ) { // 553, 28 jamonWriter.write("\n \n "); } // 555, 11 jamonWriter.write("\n \n\n"); // 558, 1 for (TableDescriptor systemTable : sysTables) { // 558, 48 jamonWriter.write("\n\n"); // 560, 1 TableName tableName = systemTable.getTableName(); // 561, 5 jamonWriter.write("\n "); // 562, 5 if ((frags != null)) { // 562, 27 jamonWriter.write("\n \n "); } // 565, 11 jamonWriter.write("\n "); // 566, 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."; } // 588, 5 jamonWriter.write("\n\n"); } // 590, 8 jamonWriter.write("\n
Table NameFrag.Description
"); // 561, 50 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName), jamonWriter); // 561, 65 jamonWriter.write(""); // 563, 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); // 564, 37 jamonWriter.write(""); // 588, 9 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(description), jamonWriter); // 588, 26 jamonWriter.write("
\n"); } // 592, 7 jamonWriter.write("\n"); } // 716, 1 private void __jamon_innerUnit__deadRegionServers(final java.io.Writer jamonWriter) throws java.io.IOException { // 718, 1 if ((deadServers != null && deadServers.size() > 0)) { // 718, 55 jamonWriter.write("\n

Dead Region Servers

\n\n \n \n \n \n \n "); // 726, 5 DeadServer deadServerUtil = master.getServerManager().getDeadServers(); ServerName [] deadServerNames = deadServers.toArray(new ServerName[deadServers.size()]); Arrays.sort(deadServerNames); for (ServerName deadServerName: deadServerNames) { // 732, 5 jamonWriter.write("\n \t\n \n \n \n "); // 737, 5 } // 740, 5 jamonWriter.write("\n \n \n \n \n
ServerNameStop time
"); // 734, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerName), jamonWriter); // 734, 33 jamonWriter.write(""); // 735, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerUtil.getTimeOfDeath(deadServerName)), jamonWriter); // 735, 64 jamonWriter.write("
Total: servers: "); // 742, 22 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServers.size()), jamonWriter); // 742, 46 jamonWriter.write("
\n"); } // 746, 7 jamonWriter.write("\n"); } // 749, 1 private void __jamon_innerUnit__peerConfigs(final java.io.Writer jamonWriter) throws java.io.IOException { // 750, 1 List peers = null; if (master.getReplicationPeerManager() != null) { peers = master.getReplicationPeerManager().listPeers(null); } // 756, 1 jamonWriter.write("\n \n \n \n \n \n \n \n \n \n \n \n \n \n"); // 770, 1 if ((peers != null && peers.size() > 0)) { // 770, 43 jamonWriter.write("\n "); // 771, 5 for (ReplicationPeerDescription peer : peers ) { // 771, 53 jamonWriter.write("\n "); // 772, 5 String peerId = peer.getPeerId(); ReplicationPeerConfig peerConfig = peer.getPeerConfig(); // 776, 5 jamonWriter.write("\n \n \n \n \n \n \n \n \n \n \n \n \n "); } // 797, 12 jamonWriter.write("\n"); } // 798, 7 jamonWriter.write("\n\n
Peer IdCluster KeyEndpointStateIsSerialBandwidthReplicateAllNamespacesExclude NamespacesTable CfsExclude Table Cfs
"); // 777, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerId), jamonWriter); // 777, 25 jamonWriter.write(""); // 778, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getClusterKey()), jamonWriter); // 778, 45 jamonWriter.write(""); // 779, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getReplicationEndpointImpl()), jamonWriter); // 779, 58 jamonWriter.write(""); // 780, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peer.isEnabled() ? "ENABLED" : "DISABLED"), jamonWriter); // 780, 60 jamonWriter.write(""); // 781, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.isSerial()), jamonWriter); // 781, 40 jamonWriter.write(""); // 782, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getBandwidth() == 0? "UNLIMITED" : StringUtils.humanReadableInt(peerConfig.getBandwidth())), jamonWriter); // 782, 120 jamonWriter.write(""); // 783, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.replicateAllUserTables()), jamonWriter); // 783, 54 jamonWriter.write("\n "); // 785, 12 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getNamespaces() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getNamespaces()).replaceAll(";", "; ")), jamonWriter); // 785, 151 jamonWriter.write("\n \n "); // 788, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getExcludeNamespaces() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getExcludeNamespaces()).replaceAll(";", "; ")), jamonWriter); // 788, 166 jamonWriter.write("\n \n "); // 791, 12 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getTableCFsMap() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getTableCFsMap()).replaceAll(";", "; ")), jamonWriter); // 791, 153 jamonWriter.write("\n \n "); // 794, 12 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getExcludeTableCFsMap() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getExcludeTableCFsMap()).replaceAll(";", "; ")), jamonWriter); // 794, 167 jamonWriter.write("\n
Total: "); // 799, 16 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf((peers != null) ? peers.size() : 0), jamonWriter); // 799, 56 jamonWriter.write("
\n"); } // 680, 1 private void __jamon_innerUnit__userSnapshots(final java.io.Writer jamonWriter) throws java.io.IOException { // 681, 1 List snapshots = master.isInitialized() ? master.getSnapshotManager().getCompletedSnapshots() : null; // 685, 1 if ((snapshots != null && snapshots.size() > 0)) { // 685, 51 jamonWriter.write("\n\n \n \n \n \n \n \n \n "); // 694, 5 for (SnapshotDescription snapshotDesc : snapshots) { // 694, 57 jamonWriter.write("\n "); // 695, 5 TableName snapshotTable = TableName.valueOf(snapshotDesc.getTable()); // 698, 5 jamonWriter.write("\n \n \n \n \n\n \n \n "); } // 709, 12 jamonWriter.write("\n

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

\n
Snapshot NameTableCreation TimeOwnerTTL
"); // 699, 70 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getName()), jamonWriter); // 699, 98 jamonWriter.write(" "); // 700, 76 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotTable.getNameAsString()), jamonWriter); // 700, 113 jamonWriter.write("\n "); // 702, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(snapshotDesc.getCreationTime())), jamonWriter); // 702, 59 jamonWriter.write(""); // 703, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getOwner()), jamonWriter); // 703, 42 jamonWriter.write("\n "); // 706, 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); // 706, 150 jamonWriter.write("\n
\n"); } // 712, 7 jamonWriter.write("\n"); } // 595, 1 private void __jamon_innerUnit__userTables(final java.io.Writer jamonWriter) throws java.io.IOException { // 596, 1 List tables = new ArrayList(); String errorMessage = getUserTables(master, tables); // 600, 1 if ((tables.size() == 0 && errorMessage != null)) { // 600, 52 jamonWriter.write("\n

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

\n"); } // 602, 7 jamonWriter.write("\n\n"); // 604, 1 if ((tables != null && tables.size() > 0)) { // 604, 45 jamonWriter.write("\n\n\n \n \n \n "); // 610, 9 if ((frags != null) ) { // 610, 32 jamonWriter.write("\n \n "); } // 612, 15 jamonWriter.write("\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n "); // 628, 5 for (TableDescriptor desc : tables) { // 628, 42 jamonWriter.write("\n "); // 629, 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 otherRegionsCount = 0; for (List list: tableRegions.values()) { otherRegionsCount += list.size(); } // now subtract known states otherRegionsCount = otherRegionsCount - openRegionsCount - offlineRegionsCount - splitRegionsCount - openingRegionsCount - closedRegionsCount - closingRegionsCount; String encodedTableName = URLEncoder.encode(tableName.getNameAsString()); // 653, 5 jamonWriter.write("\n \n \n "); // 656, 9 if ((frags != null) ) { // 656, 32 jamonWriter.write("\n \n "); } // 658, 15 jamonWriter.write("\n \n \n "); // 661, 9 if ((openingRegionsCount > 0) ) { // 661, 42 jamonWriter.write(" "); } // 661, 177 else { // 661, 184 jamonWriter.write(" "); } // 661, 225 jamonWriter.write("\n "); // 662, 9 if ((closedRegionsCount > 0) ) { // 662, 41 jamonWriter.write(" "); } // 662, 174 else { // 662, 181 jamonWriter.write(" "); } // 662, 221 jamonWriter.write("\n "); // 663, 9 if ((closingRegionsCount > 0) ) { // 663, 42 jamonWriter.write(" "); } // 663, 177 else { // 663, 184 jamonWriter.write(" "); } // 663, 225 jamonWriter.write("\n "); // 664, 9 if ((offlineRegionsCount > 0) ) { // 664, 42 jamonWriter.write(" "); } // 664, 177 else { // 664, 184 jamonWriter.write(" "); } // 664, 225 jamonWriter.write("\n "); // 665, 9 if ((splitRegionsCount > 0) ) { // 665, 40 jamonWriter.write(" "); } // 665, 171 else { // 665, 178 jamonWriter.write(" "); } // 665, 217 jamonWriter.write("\n \n \n \n "); } // 669, 12 jamonWriter.write("\n

"); // 670, 8 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tables.size()), jamonWriter); // 670, 27 jamonWriter.write(" table(s) in set. [Details]. Click count below to\n see list of regions currently in 'state' designated by the column title. For 'Other' Region state,\n browse to hbase:meta and adjust filter on 'Meta Entries' to\n query on states other than those listed here. Queries may take a while if the hbase:meta table\n is large.

\n\n
NamespaceNameFrag.StateRegionsDescription
OPENOPENINGCLOSEDCLOSINGOFFLINESPLITOther
"); // 654, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName.getNamespaceAsString()), jamonWriter); // 654, 51 jamonWriter.write(""); // 655, 59 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(URLEncoder.encode(tableName.getQualifierAsString())), jamonWriter); // 655, 116 jamonWriter.write(" "); // 657, 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); // 657, 150 jamonWriter.write(""); // 659, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableState.getState()), jamonWriter); // 659, 40 jamonWriter.write(""); // 660, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openRegionsCount), jamonWriter); // 660, 35 jamonWriter.write(""); // 661, 146 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openingRegionsCount), jamonWriter); // 661, 171 jamonWriter.write(""); // 661, 188 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openingRegionsCount), jamonWriter); // 661, 213 jamonWriter.write(""); // 662, 144 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(closedRegionsCount), jamonWriter); // 662, 168 jamonWriter.write(""); // 662, 185 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(closedRegionsCount), jamonWriter); // 662, 209 jamonWriter.write(""); // 663, 146 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(closingRegionsCount), jamonWriter); // 663, 171 jamonWriter.write(""); // 663, 188 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(closingRegionsCount), jamonWriter); // 663, 213 jamonWriter.write(""); // 664, 146 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(offlineRegionsCount), jamonWriter); // 664, 171 jamonWriter.write(""); // 664, 188 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(offlineRegionsCount), jamonWriter); // 664, 213 jamonWriter.write(""); // 665, 142 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(splitRegionsCount), jamonWriter); // 665, 165 jamonWriter.write(""); // 665, 182 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(splitRegionsCount), jamonWriter); // 665, 205 jamonWriter.write(""); // 666, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(otherRegionsCount), jamonWriter); // 666, 36 jamonWriter.write(""); // 667, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(htDesc.toStringCustomizedValues()), jamonWriter); // 667, 52 jamonWriter.write("
\n"); } // 677, 7 jamonWriter.write("\n"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy