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/apurtell/tmp/RM/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_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); } // 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"); // 176, 2 if (master.isActiveMaster() ) { // 176, 33 jamonWriter.write("\n
\n
\n

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

\n
\n
\n\n
\n \n "); // 185, 9 if (JvmVersion.isBadJvmVersion() ) { // 185, 45 jamonWriter.write("\n
\n Your current JVM version "); // 187, 36 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(System.getProperty("java.version")), jamonWriter); // 187, 76 jamonWriter.write(" is known to be\n unstable with HBase. Please see the\n HBase Reference Guide\n for details.\n
\n "); } // 192, 15 jamonWriter.write("\n "); // 193, 9 if (master.isInitialized() && !catalogJanitorEnabled ) { // 193, 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 "); } // 198, 15 jamonWriter.write("\n "); // 199, 9 if (master.isInMaintenanceMode() ) { // 199, 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 "); } // 204, 15 jamonWriter.write("\n "); // 205, 9 if (!master.isBalancerOn() ) { // 205, 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 "); } // 211, 15 jamonWriter.write("\n "); // 212, 9 if (!master.isSplitOrMergeEnabled(MasterSwitchType.SPLIT) ) { // 212, 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 "); } // 218, 15 jamonWriter.write("\n "); // 219, 9 if (!master.isSplitOrMergeEnabled(MasterSwitchType.MERGE) ) { // 219, 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 "); } // 225, 15 jamonWriter.write("\n "); // 226, 9 if (master.getAssignmentManager() != null ) { // 226, 54 jamonWriter.write("\n "); // 227, 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()); } // 227, 92 jamonWriter.write("\n "); } // 228, 15 jamonWriter.write("\n "); // 229, 9 if (!master.isInMaintenanceMode() && master.getMasterCoprocessorHost() != null ) { // 229, 91 jamonWriter.write("\n "); // 230, 11 if (master.getMasterCoprocessorHost().findCoprocessor("RSGroupAdminEndpoint") != null && serverManager.getOnlineServersList().size() > 0 ) { // 231, 63 jamonWriter.write("\n
\n

RSGroup

\n "); // 234, 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); } // 234, 81 jamonWriter.write("\n
\n "); } // 236, 17 jamonWriter.write("\n "); } // 237, 15 jamonWriter.write("\n
\n

Region Servers

\n "); // 240, 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); } // 240, 74 jamonWriter.write("\n\n "); // 242, 13 if ((deadServers != null) ) { // 242, 42 jamonWriter.write("\n "); // 243, 17 { // 243, 17 __jamon_innerUnit__deadRegionServers(jamonWriter); } // 243, 40 jamonWriter.write("\n "); } // 244, 19 jamonWriter.write("\n
\n
\n "); // 247, 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 ); } // 247, 58 jamonWriter.write("\n
\n
\n

Tables

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

Peers

\n "); // 282, 13 { // 282, 13 __jamon_innerUnit__peerConfigs(jamonWriter); } // 282, 30 jamonWriter.write("\n
\n\t"); } // 284, 2 else { // 284, 9 jamonWriter.write("\n
\n "); // 286, 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 ); } // 286, 58 jamonWriter.write("\n
\n\t"); } // 288, 8 jamonWriter.write("\n\n\n
\n "); // 292, 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); } // 292, 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 "); // 373, 17 if (master.isActiveMaster() ) { // 373, 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 "); // 390, 18 if (frags != null ) { // 390, 39 jamonWriter.write("\n\t \n\t \n\t \n\t \n\t \n\t "); } // 396, 24 jamonWriter.write("\n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n "); } // 408, 23 jamonWriter.write("\n
Attribute NameValueDescription
JVM Version"); // 305, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(JvmVersion.getVersion()), jamonWriter); // 305, 54 jamonWriter.write("JVM vendor and version
HBase Version"); // 310, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getVersion()), jamonWriter); // 310, 84 jamonWriter.write(", revision="); // 310, 95 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getRevision()), jamonWriter); // 310, 155 jamonWriter.write("HBase version and revision
HBase Compiled"); // 314, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getDate()), jamonWriter); // 314, 81 jamonWriter.write(", "); // 314, 83 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getUser()), jamonWriter); // 314, 139 jamonWriter.write("When HBase version was compiled and by whom
HBase Source Checksum"); // 319, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getSrcChecksum()), jamonWriter); // 319, 88 jamonWriter.write("HBase source SHA512 checksum
Hadoop Version"); // 324, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getVersion()), jamonWriter); // 324, 78 jamonWriter.write(", revision="); // 324, 89 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getRevision()), jamonWriter); // 324, 143 jamonWriter.write("Hadoop version and revision
Hadoop Compiled"); // 329, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getDate()), jamonWriter); // 329, 75 jamonWriter.write(", "); // 329, 77 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getUser()), jamonWriter); // 329, 127 jamonWriter.write("When Hadoop version was compiled and by whom
Hadoop Source Checksum"); // 334, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getSrcChecksum()), jamonWriter); // 334, 82 jamonWriter.write("Hadoop source MD5 checksum
ZooKeeper Client Version"); // 339, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getVersion()), jamonWriter); // 339, 72 jamonWriter.write(", revision="); // 339, 83 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getRevisionHash()), jamonWriter); // 339, 135 jamonWriter.write("ZooKeeper client version and revision hash
ZooKeeper Client Compiled"); // 344, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getBuildDate()), jamonWriter); // 344, 74 jamonWriter.write("When ZooKeeper client version was compiled
ZooKeeper Quorum "); // 350, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter); // 350, 48 jamonWriter.write(" Addresses of all registered ZK servers. For more, see zk dump.
ZooKeeper Base Path "); // 355, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getZooKeeper().getZNodePaths().baseZNode), jamonWriter); // 355, 79 jamonWriter.write("Root node of this cluster in ZK.
Cluster Key "); // 360, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter); // 360, 48 jamonWriter.write(":"); // 360, 49 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getZooKeeper().getZNodePaths().baseZNode), jamonWriter); // 360, 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"); // 365, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(CommonFSUtils.getRootDir(master.getConfiguration()).toString()), jamonWriter); // 365, 93 jamonWriter.write("Location of HBase home directory
HMaster Start Time"); // 370, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterStartTime())), jamonWriter); // 370, 68 jamonWriter.write("Date stamp of when this HMaster was started
HMaster Active Time"); // 376, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterActiveTime())), jamonWriter); // 376, 70 jamonWriter.write("Date stamp of when this HMaster became active
HBase Cluster ID"); // 381, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getClusterId() != null ? master.getClusterId() : "Not set"), jamonWriter); // 381, 97 jamonWriter.write("Unique identifier generated for each HBase cluster
Load average"); // 386, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerManager() == null ? "0.00" : StringUtils.limitDecimalTo2(master.getServerManager().getAverageLoad())), jamonWriter); // 387, 98 jamonWriter.write("Average number of regions per regionserver. Naive computation.
Fragmentation"); // 393, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get("-TOTAL-") != null ? frags.get("-TOTAL-").intValue() + "%" : "n/a"), jamonWriter); // 393, 108 jamonWriter.write("Overall fragmentation of all tables, including hbase:meta
Coprocessors"); // 399, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getMasterCoprocessorHost() == null ? "[]" : java.util.Arrays.toString(master.getMasterCoprocessors())), jamonWriter); // 400, 84 jamonWriter.write("Coprocessors currently loaded by the master
LoadBalancer"); // 405, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getLoadBalancerClassName()), jamonWriter); // 405, 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"); } // 543, 1 private void __jamon_innerUnit__catalogTables(final java.io.Writer jamonWriter) throws java.io.IOException { // 544, 1 List sysTables = master.isInitialized() ? master.listTableDescriptorsByNamespace(NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR) : null; // 548, 1 if ((sysTables != null && sysTables.size() > 0)) { // 548, 51 jamonWriter.write("\n\n\n \n "); // 552, 5 if ((frags != null) ) { // 552, 28 jamonWriter.write("\n \n "); } // 554, 11 jamonWriter.write("\n \n\n"); // 557, 1 for (TableDescriptor systemTable : sysTables) { // 557, 48 jamonWriter.write("\n\n"); // 559, 1 TableName tableName = systemTable.getTableName(); // 560, 5 jamonWriter.write("\n "); // 561, 5 if ((frags != null)) { // 561, 27 jamonWriter.write("\n \n "); } // 564, 11 jamonWriter.write("\n "); // 565, 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."; } // 587, 5 jamonWriter.write("\n\n"); } // 589, 8 jamonWriter.write("\n
Table NameFrag.Description
"); // 560, 50 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName), jamonWriter); // 560, 65 jamonWriter.write(""); // 562, 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); // 563, 37 jamonWriter.write(""); // 587, 9 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(description), jamonWriter); // 587, 26 jamonWriter.write("
\n"); } // 591, 7 jamonWriter.write("\n"); } // 715, 1 private void __jamon_innerUnit__deadRegionServers(final java.io.Writer jamonWriter) throws java.io.IOException { // 717, 1 if ((deadServers != null && deadServers.size() > 0)) { // 717, 55 jamonWriter.write("\n

Dead Region Servers

\n\n \n \n \n \n \n "); // 725, 5 DeadServer deadServerUtil = master.getServerManager().getDeadServers(); ServerName [] deadServerNames = deadServers.toArray(new ServerName[deadServers.size()]); Arrays.sort(deadServerNames); for (ServerName deadServerName: deadServerNames) { // 731, 5 jamonWriter.write("\n \t\n \n \n \n "); // 736, 5 } // 739, 5 jamonWriter.write("\n \n \n \n \n
ServerNameStop time
"); // 733, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerName), jamonWriter); // 733, 33 jamonWriter.write(""); // 734, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerUtil.getTimeOfDeath(deadServerName)), jamonWriter); // 734, 64 jamonWriter.write("
Total: servers: "); // 741, 22 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServers.size()), jamonWriter); // 741, 46 jamonWriter.write("
\n"); } // 745, 7 jamonWriter.write("\n"); } // 748, 1 private void __jamon_innerUnit__peerConfigs(final java.io.Writer jamonWriter) throws java.io.IOException { // 749, 1 List peers = null; if (master.getReplicationPeerManager() != null) { peers = master.getReplicationPeerManager().listPeers(null); } // 755, 1 jamonWriter.write("\n \n \n \n \n \n \n \n \n \n \n \n \n \n"); // 769, 1 if ((peers != null && peers.size() > 0)) { // 769, 43 jamonWriter.write("\n "); // 770, 5 for (ReplicationPeerDescription peer : peers ) { // 770, 53 jamonWriter.write("\n "); // 771, 5 String peerId = peer.getPeerId(); ReplicationPeerConfig peerConfig = peer.getPeerConfig(); // 775, 5 jamonWriter.write("\n \n \n \n \n \n \n \n \n \n \n \n \n "); } // 796, 12 jamonWriter.write("\n"); } // 797, 7 jamonWriter.write("\n\n
Peer IdCluster KeyEndpointStateIsSerialBandwidthReplicateAllNamespacesExclude NamespacesTable CfsExclude Table Cfs
"); // 776, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerId), jamonWriter); // 776, 25 jamonWriter.write(""); // 777, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getClusterKey()), jamonWriter); // 777, 45 jamonWriter.write(""); // 778, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getReplicationEndpointImpl()), jamonWriter); // 778, 58 jamonWriter.write(""); // 779, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peer.isEnabled() ? "ENABLED" : "DISABLED"), jamonWriter); // 779, 60 jamonWriter.write(""); // 780, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.isSerial()), jamonWriter); // 780, 40 jamonWriter.write(""); // 781, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getBandwidth() == 0? "UNLIMITED" : StringUtils.humanReadableInt(peerConfig.getBandwidth())), jamonWriter); // 781, 120 jamonWriter.write(""); // 782, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.replicateAllUserTables()), jamonWriter); // 782, 54 jamonWriter.write("\n "); // 784, 12 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getNamespaces() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getNamespaces()).replaceAll(";", "; ")), jamonWriter); // 784, 151 jamonWriter.write("\n \n "); // 787, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getExcludeNamespaces() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getExcludeNamespaces()).replaceAll(";", "; ")), jamonWriter); // 787, 166 jamonWriter.write("\n \n "); // 790, 12 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getTableCFsMap() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getTableCFsMap()).replaceAll(";", "; ")), jamonWriter); // 790, 153 jamonWriter.write("\n \n "); // 793, 12 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getExcludeTableCFsMap() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getExcludeTableCFsMap()).replaceAll(";", "; ")), jamonWriter); // 793, 167 jamonWriter.write("\n
Total: "); // 798, 16 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf((peers != null) ? peers.size() : 0), jamonWriter); // 798, 56 jamonWriter.write("
\n"); } // 679, 1 private void __jamon_innerUnit__userSnapshots(final java.io.Writer jamonWriter) throws java.io.IOException { // 680, 1 List snapshots = master.isInitialized() ? master.getSnapshotManager().getCompletedSnapshots() : null; // 684, 1 if ((snapshots != null && snapshots.size() > 0)) { // 684, 51 jamonWriter.write("\n\n \n \n \n \n \n \n \n "); // 693, 5 for (SnapshotDescription snapshotDesc : snapshots) { // 693, 57 jamonWriter.write("\n "); // 694, 5 TableName snapshotTable = TableName.valueOf(snapshotDesc.getTable()); // 697, 5 jamonWriter.write("\n \n \n \n \n\n \n \n "); } // 708, 12 jamonWriter.write("\n

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

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

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

\n"); } // 601, 7 jamonWriter.write("\n\n"); // 603, 1 if ((tables != null && tables.size() > 0)) { // 603, 45 jamonWriter.write("\n\n\n \n \n \n "); // 609, 9 if ((frags != null) ) { // 609, 32 jamonWriter.write("\n \n "); } // 611, 15 jamonWriter.write("\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n "); // 627, 5 for (TableDescriptor desc : tables) { // 627, 42 jamonWriter.write("\n "); // 628, 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()); // 652, 5 jamonWriter.write("\n \n \n "); // 655, 9 if ((frags != null) ) { // 655, 32 jamonWriter.write("\n \n "); } // 657, 15 jamonWriter.write("\n \n \n "); // 660, 9 if ((openingRegionsCount > 0) ) { // 660, 42 jamonWriter.write(" "); } // 660, 177 else { // 660, 184 jamonWriter.write(" "); } // 660, 225 jamonWriter.write("\n "); // 661, 9 if ((closedRegionsCount > 0) ) { // 661, 41 jamonWriter.write(" "); } // 661, 174 else { // 661, 181 jamonWriter.write(" "); } // 661, 221 jamonWriter.write("\n "); // 662, 9 if ((closingRegionsCount > 0) ) { // 662, 42 jamonWriter.write(" "); } // 662, 177 else { // 662, 184 jamonWriter.write(" "); } // 662, 225 jamonWriter.write("\n "); // 663, 9 if ((offlineRegionsCount > 0) ) { // 663, 42 jamonWriter.write(" "); } // 663, 177 else { // 663, 184 jamonWriter.write(" "); } // 663, 225 jamonWriter.write("\n "); // 664, 9 if ((splitRegionsCount > 0) ) { // 664, 40 jamonWriter.write(" "); } // 664, 171 else { // 664, 178 jamonWriter.write(" "); } // 664, 217 jamonWriter.write("\n \n \n \n "); } // 668, 12 jamonWriter.write("\n

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy