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/stack/checkouts/hbase.git.clean/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon

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

// 32, 1
import java.util.*;
// 33, 1
import org.apache.hadoop.hbase.HBaseConfiguration;
// 34, 1
import org.apache.hadoop.hbase.HConstants;
// 35, 1
import org.apache.hadoop.hbase.HRegionInfo;
// 36, 1
import org.apache.hadoop.hbase.HTableDescriptor;
// 37, 1
import org.apache.hadoop.hbase.NamespaceDescriptor;
// 38, 1
import org.apache.hadoop.hbase.ServerLoad;
// 39, 1
import org.apache.hadoop.hbase.ServerName;
// 40, 1
import org.apache.hadoop.hbase.TableName;
// 41, 1
import org.apache.hadoop.hbase.client.Admin;
// 42, 1
import org.apache.hadoop.hbase.client.MasterSwitchType;
// 43, 1
import org.apache.hadoop.hbase.client.SnapshotDescription;
// 44, 1
import org.apache.hadoop.hbase.master.assignment.AssignmentManager;
// 45, 1
import org.apache.hadoop.hbase.master.DeadServer;
// 46, 1
import org.apache.hadoop.hbase.master.HMaster;
// 47, 1
import org.apache.hadoop.hbase.master.RegionState;
// 48, 1
import org.apache.hadoop.hbase.master.ServerManager;
// 49, 1
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
// 50, 1
import org.apache.hadoop.hbase.quotas.QuotaUtil;
// 51, 1
import org.apache.hadoop.hbase.security.access.AccessControlLists;
// 52, 1
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants;
// 53, 1
import org.apache.hadoop.hbase.tool.Canary;
// 54, 1
import org.apache.hadoop.hbase.util.Bytes;
// 55, 1
import org.apache.hadoop.hbase.util.FSUtils;
// 56, 1
import org.apache.hadoop.hbase.util.JvmVersion;
// 57, 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 ServerName metaLocation;
  private final List servers;
  private final boolean catalogJanitorEnabled;
  private final String format;
  private final Set deadServers;
  private final String filter;
  private final Map frags;
  private final ServerManager serverManager;
  private final AssignmentManager assignmentManager;
  // 69, 1
  
  public String formatZKString() {
    StringBuilder quorums = new StringBuilder();
    String zkQuorum = master.getZooKeeper().getQuorum();

    if (null == zkQuorum) {
      return quorums.toString();
    }

    String[] zks = zkQuorum.split(",");

    if (zks.length == 0) {
      return quorums.toString();
    }

    for(int i = 0; i < zks.length; ++i) {
      quorums.append(zks[i].trim());

      if (i != (zks.length - 1)) {
        quorums.append("
"); } } return quorums.toString(); } protected static org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl.ImplData __jamon_setOptionalArguments(org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl.ImplData p_implData) { if(! p_implData.getMetaLocation__IsNotDefault()) { p_implData.setMetaLocation(null); } if(! p_implData.getServers__IsNotDefault()) { p_implData.setServers(null); } if(! p_implData.getCatalogJanitorEnabled__IsNotDefault()) { p_implData.setCatalogJanitorEnabled(true); } if(! p_implData.getFormat__IsNotDefault()) { p_implData.setFormat("html"); } if(! p_implData.getDeadServers__IsNotDefault()) { p_implData.setDeadServers(null); } if(! p_implData.getFilter__IsNotDefault()) { p_implData.setFilter("general"); } if(! p_implData.getFrags__IsNotDefault()) { p_implData.setFrags(null); } if(! p_implData.getServerManager__IsNotDefault()) { p_implData.setServerManager(null); } if(! p_implData.getAssignmentManager__IsNotDefault()) { p_implData.setAssignmentManager(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(); metaLocation = p_implData.getMetaLocation(); servers = p_implData.getServers(); catalogJanitorEnabled = p_implData.getCatalogJanitorEnabled(); format = p_implData.getFormat(); deadServers = p_implData.getDeadServers(); filter = p_implData.getFilter(); frags = p_implData.getFrags(); serverManager = p_implData.getServerManager(); assignmentManager = p_implData.getAssignmentManager(); } @Override public void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException { // 60, 1 if (format.equals("json") ) { // 60, 30 jamonWriter.write("\n "); // 61, 3 { org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl __jamon__var_6 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager()); __jamon__var_6.setFormat("json" ); __jamon__var_6.setFilter(filter); __jamon__var_6.renderNoFlush(jamonWriter); } // 61, 68 jamonWriter.write("\n "); // 62, 3 return; } // 63, 7 jamonWriter.write("\n"); // 64, 1 ServerManager serverManager = master.getServerManager(); AssignmentManager assignmentManager = master.getAssignmentManager(); // 96, 1 jamonWriter.write("\n\n\n \n \n "); // 103, 12 if (master.isActiveMaster() ) { // 103, 43 jamonWriter.write("Master: "); } // 103, 51 else { // 103, 58 jamonWriter.write("Backup Master: "); } // 103, 79 jamonWriter.write("\n "); // 104, 5 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerName().getHostname()), jamonWriter); // 104, 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"); // 142, 2 if (master.isActiveMaster() ) { // 142, 33 jamonWriter.write("\n
\n
\n

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

\n
\n
\n\n
\n \n "); // 151, 9 if (JvmVersion.isBadJvmVersion() ) { // 151, 45 jamonWriter.write("\n
\n Your current JVM version "); // 153, 36 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(System.getProperty("java.version")), jamonWriter); // 153, 76 jamonWriter.write(" is known to be\n unstable with HBase. Please see the\n HBase Reference Guide\n for details.\n
\n "); } // 158, 15 jamonWriter.write("\n "); // 159, 9 if (master.isInitialized() && !catalogJanitorEnabled ) { // 159, 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 "); } // 164, 15 jamonWriter.write("\n "); // 165, 9 if (!master.isBalancerOn() ) { // 165, 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 "); } // 171, 15 jamonWriter.write("\n "); // 172, 9 if (!master.isSplitOrMergeEnabled(MasterSwitchType.SPLIT) ) { // 172, 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 "); } // 178, 15 jamonWriter.write("\n "); // 179, 9 if (!master.isSplitOrMergeEnabled(MasterSwitchType.MERGE) ) { // 179, 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 "); } // 185, 15 jamonWriter.write("\n\n
\n

Region Servers

\n "); // 189, 13 { org.apache.hadoop.hbase.tmpl.master.RegionServerListTmpl __jamon__var_7 = new org.apache.hadoop.hbase.tmpl.master.RegionServerListTmpl(this.getTemplateManager()); __jamon__var_7.setServers(servers ); __jamon__var_7.renderNoFlush(jamonWriter, master); } // 189, 74 jamonWriter.write("\n\n "); // 191, 13 if ((deadServers != null) ) { // 191, 42 jamonWriter.write("\n "); // 192, 17 { // 192, 17 __jamon_innerUnit__deadRegionServers(jamonWriter); } // 192, 40 jamonWriter.write("\n "); } // 193, 19 jamonWriter.write("\n
\n
\n "); // 196, 13 { org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl __jamon__var_8 = new org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl(this.getTemplateManager()); __jamon__var_8.renderNoFlush(jamonWriter, master ); } // 196, 58 jamonWriter.write("\n
\n
\n

Tables

\n
\n \n
\n
\n "); // 214, 25 if ((metaLocation != null) ) { // 214, 55 jamonWriter.write("\n "); // 215, 29 { // 215, 29 __jamon_innerUnit__userTables(jamonWriter); } // 215, 45 jamonWriter.write("\n "); } // 216, 31 jamonWriter.write("\n
\n
\n "); // 219, 25 if ((metaLocation != null) ) { // 219, 55 jamonWriter.write("\n "); // 220, 29 { // 220, 29 __jamon_innerUnit__catalogTables(jamonWriter); } // 220, 48 jamonWriter.write("\n "); } // 221, 31 jamonWriter.write("\n
\n
\n "); // 224, 25 { // 224, 25 __jamon_innerUnit__userSnapshots(jamonWriter); } // 224, 44 jamonWriter.write("\n
\n
\n
\n
\n "); // 229, 9 if (master.getAssignmentManager() != null ) { // 229, 54 jamonWriter.write("\n "); // 230, 9 { org.apache.hadoop.hbase.tmpl.master.AssignmentManagerStatusTmpl __jamon__var_9 = new org.apache.hadoop.hbase.tmpl.master.AssignmentManagerStatusTmpl(this.getTemplateManager()); __jamon__var_9.renderNoFlush(jamonWriter, master.getAssignmentManager()); } // 230, 90 jamonWriter.write("\n "); } // 231, 15 jamonWriter.write("\n\t"); } // 232, 2 else { // 232, 9 jamonWriter.write("\n
\n "); // 234, 13 { org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl __jamon__var_10 = new org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl(this.getTemplateManager()); __jamon__var_10.renderNoFlush(jamonWriter, master ); } // 234, 58 jamonWriter.write("\n
\n\t"); } // 236, 8 jamonWriter.write("\n\n\n
\n "); // 240, 13 { org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl __jamon__var_11 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager()); __jamon__var_11.setFilter(filter ); __jamon__var_11.renderNoFlush(jamonWriter); } // 240, 61 jamonWriter.write("\n
\n\n
\n

Software Attributes

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n "); // 311, 17 if (master.isActiveMaster() ) { // 311, 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 "); // 328, 18 if (frags != null ) { // 328, 39 jamonWriter.write("\n\t \n\t \n\t \n\t \n\t \n\t "); } // 334, 24 jamonWriter.write("\n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n "); } // 346, 23 jamonWriter.write("\n
Attribute NameValueDescription
HBase Version"); // 253, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getVersion()), jamonWriter); // 253, 84 jamonWriter.write(", revision="); // 253, 95 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getRevision()), jamonWriter); // 253, 155 jamonWriter.write("HBase version and revision
HBase Compiled"); // 257, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getDate()), jamonWriter); // 257, 81 jamonWriter.write(", "); // 257, 83 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getUser()), jamonWriter); // 257, 139 jamonWriter.write("When HBase version was compiled and by whom
HBase Source Checksum"); // 262, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getSrcChecksum()), jamonWriter); // 262, 88 jamonWriter.write("HBase source MD5 checksum
Hadoop Version"); // 267, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getVersion()), jamonWriter); // 267, 78 jamonWriter.write(", revision="); // 267, 89 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getRevision()), jamonWriter); // 267, 143 jamonWriter.write("Hadoop version and revision
Hadoop Compiled"); // 272, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getDate()), jamonWriter); // 272, 75 jamonWriter.write(", "); // 272, 77 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getUser()), jamonWriter); // 272, 127 jamonWriter.write("When Hadoop version was compiled and by whom
Hadoop Source Checksum"); // 277, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getSrcChecksum()), jamonWriter); // 277, 82 jamonWriter.write("Hadoop source MD5 checksum
ZooKeeper Client Version"); // 282, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getVersion()), jamonWriter); // 282, 72 jamonWriter.write(", revision="); // 282, 83 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getRevision()), jamonWriter); // 282, 131 jamonWriter.write("ZooKeeper client version and revision
ZooKeeper Client Compiled"); // 287, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getBuildDate()), jamonWriter); // 287, 74 jamonWriter.write("When ZooKeeper client version was compiled
ZooKeeper Quorum "); // 293, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter); // 293, 48 jamonWriter.write(" Addresses of all registered ZK servers. For more, see zk dump.
ZooKeeper Base Path "); // 298, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getZooKeeper().getZNodePaths().baseZNode), jamonWriter); // 298, 79 jamonWriter.write("Root node of this cluster in ZK.
HBase Root Directory"); // 303, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(FSUtils.getRootDir(master.getConfiguration()).toString()), jamonWriter); // 303, 87 jamonWriter.write("Location of HBase home directory
HMaster Start Time"); // 308, 25 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterStartTime())), jamonWriter); // 308, 68 jamonWriter.write("Date stamp of when this HMaster was started
HMaster Active Time"); // 314, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterActiveTime())), jamonWriter); // 314, 70 jamonWriter.write("Date stamp of when this HMaster became active
HBase Cluster ID"); // 319, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getClusterId() != null ? master.getClusterId() : "Not set"), jamonWriter); // 319, 97 jamonWriter.write("Unique identifier generated for each HBase cluster
Load average"); // 324, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerManager() == null ? "0.00" : StringUtils.limitDecimalTo2(master.getServerManager().getAverageLoad())), jamonWriter); // 325, 98 jamonWriter.write("Average number of regions per regionserver. Naive computation.
Fragmentation"); // 331, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get("-TOTAL-") != null ? frags.get("-TOTAL-").intValue() + "%" : "n/a"), jamonWriter); // 331, 108 jamonWriter.write("Overall fragmentation of all tables, including hbase:meta
Coprocessors"); // 337, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getMasterCoprocessorHost() == null ? "[]" : java.util.Arrays.toString(master.getMasterCoprocessors())), jamonWriter); // 338, 84 jamonWriter.write("Coprocessors currently loaded by the master
LoadBalancer"); // 343, 26 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getLoadBalancerClassName()), jamonWriter); // 343, 65 jamonWriter.write("LoadBalancer to be used in the Master
\n
\n
\n
\n\n \n \n \n \n\n\n"); } // 504, 1 private void __jamon_innerUnit__deadRegionServers(final java.io.Writer jamonWriter) throws java.io.IOException { // 506, 1 if ((deadServers != null && deadServers.size() > 0)) { // 506, 55 jamonWriter.write("\n

Dead Region Servers

\n\n \n \n \n \n \n "); // 514, 5 DeadServer deadServerUtil = master.getServerManager().getDeadServers(); ServerName [] deadServerNames = deadServers.toArray(new ServerName[deadServers.size()]); Arrays.sort(deadServerNames); for (ServerName deadServerName: deadServerNames) { // 520, 5 jamonWriter.write("\n \t\n \n \n \n "); // 525, 5 } // 528, 5 jamonWriter.write("\n \n \n \n \n
ServerNameStop time
"); // 522, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerName), jamonWriter); // 522, 33 jamonWriter.write(""); // 523, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerUtil.getTimeOfDeath(deadServerName)), jamonWriter); // 523, 64 jamonWriter.write("
Total: servers: "); // 530, 22 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServers.size()), jamonWriter); // 530, 46 jamonWriter.write("
\n"); } // 534, 7 jamonWriter.write("\n"); } // 358, 1 private void __jamon_innerUnit__catalogTables(final java.io.Writer jamonWriter) throws java.io.IOException { // 359, 1 HTableDescriptor[] sysTables = null; try (Admin admin = master.getConnection().getAdmin()) { sysTables = master.isInitialized() ? admin.listTableDescriptorsByNamespace( NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR) : null; } // 366, 1 if ((sysTables != null && sysTables.length > 0)) { // 366, 51 jamonWriter.write("\n\n\n \n "); // 370, 5 if ((frags != null) ) { // 370, 28 jamonWriter.write("\n \n "); } // 372, 11 jamonWriter.write("\n \n\n"); // 375, 1 for (HTableDescriptor systemTable : sysTables) { // 375, 49 jamonWriter.write("\n\n"); // 377, 1 TableName tableName = systemTable.getTableName(); // 378, 5 jamonWriter.write("\n "); // 379, 5 if ((frags != null)) { // 379, 27 jamonWriter.write("\n \n "); } // 382, 11 jamonWriter.write("\n "); // 383, 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(Canary.DEFAULT_WRITE_TABLE_NAME)){ description = "The hbase:canary table is used to sniff the write availbility of" + " each regionserver."; } else if (tableName.equals(AccessControlLists.ACL_TABLE_NAME)){ description = "The hbase:acl table holds information about acl."; } else if (tableName.equals(VisibilityConstants.LABELS_TABLE_NAME)){ description = "The hbase:labels table holds information about visibility labels."; } else if (tableName.equals(TableName.NAMESPACE_TABLE_NAME)){ description = "The hbase:namespace table holds information about namespaces."; } else if (tableName.equals(QuotaUtil.QUOTA_TABLE_NAME)){ description = "The hbase:quota table holds quota information about number" + " or size of requests in a given time frame."; } else if (tableName.equals(TableName.valueOf("hbase:rsgroup"))){ description = "The hbase:rsgroup table holds information about regionserver groups."; } else if (tableName.equals(TableName.valueOf("hbase:replication"))) { description = "The hbase:replication table tracks cross cluster replication through " + "WAL file offsets."; } // 405, 5 jamonWriter.write("\n\n"); } // 407, 8 jamonWriter.write("\n
Table NameFrag.Description
"); // 378, 50 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName), jamonWriter); // 378, 65 jamonWriter.write(""); // 380, 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); // 381, 37 jamonWriter.write(""); // 405, 9 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(description), jamonWriter); // 405, 26 jamonWriter.write("
\n"); } // 409, 7 jamonWriter.write("\n"); } // 473, 1 private void __jamon_innerUnit__userSnapshots(final java.io.Writer jamonWriter) throws java.io.IOException { // 474, 1 List snapshots = null; try (Admin admin = master.getConnection().getAdmin()) { snapshots = master.isInitialized() ? admin.listSnapshots() : null; } // 480, 1 if ((snapshots != null && snapshots.size() > 0)) { // 480, 51 jamonWriter.write("\n\n \n \n \n \n \n "); // 487, 5 for (SnapshotDescription snapshotDesc : snapshots) { // 487, 57 jamonWriter.write("\n "); // 488, 5 TableName snapshotTable = snapshotDesc.getTableName(); // 491, 5 jamonWriter.write("\n \n \n \n \n "); } // 497, 12 jamonWriter.write("\n

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

\n
Snapshot NameTableCreation Time
"); // 492, 70 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getName()), jamonWriter); // 492, 98 jamonWriter.write(" "); // 493, 76 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotTable.getNameAsString()), jamonWriter); // 493, 113 jamonWriter.write("\n "); // 495, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(snapshotDesc.getCreationTime())), jamonWriter); // 495, 59 jamonWriter.write("
\n"); } // 500, 7 jamonWriter.write("\n"); } // 412, 1 private void __jamon_innerUnit__userTables(final java.io.Writer jamonWriter) throws java.io.IOException { // 413, 1 HTableDescriptor[] tables = null; try (Admin admin = master.getConnection().getAdmin()) { tables = master.isInitialized() ? admin.listTables() : null; } // 419, 1 if ((tables != null && tables.length > 0)) { // 419, 45 jamonWriter.write("\n\n \n \n \n "); // 424, 9 if ((frags != null) ) { // 424, 32 jamonWriter.write("\n \n "); } // 426, 15 jamonWriter.write("\n \n \n \n \n \n \n \n "); // 434, 5 for (HTableDescriptor htDesc : tables) { // 434, 45 jamonWriter.write("\n "); // 435, 5 TableName tableName = htDesc.getTableName(); Map> tableRegions = master.getAssignmentManager().getRegionStates() .getRegionByStateOfTable(tableName); int openRegionsCount = tableRegions.get(RegionState.State.OPEN).size(); int offlineRegionsCount = tableRegions.get(RegionState.State.OFFLINE).size(); int splitRegionsCount = tableRegions.get(RegionState.State.SPLIT).size(); int failedRegionsCount = tableRegions.get(RegionState.State.FAILED_OPEN).size() + tableRegions.get(RegionState.State.FAILED_CLOSE).size(); int otherRegionsCount = 0; for (List list: tableRegions.values()) { otherRegionsCount += list.size(); } // now subtract known states otherRegionsCount = otherRegionsCount - openRegionsCount - failedRegionsCount - offlineRegionsCount - splitRegionsCount; // 454, 5 jamonWriter.write("\n \n \n "); // 457, 9 if ((frags != null) ) { // 457, 32 jamonWriter.write("\n \n "); } // 459, 15 jamonWriter.write("\n \n \n \n \n \n \n \n "); } // 467, 12 jamonWriter.write("\n

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

\n
NamespaceTable NameFrag.Online RegionsOffline RegionsFailed RegionsSplit RegionsOther RegionsDescription
"); // 455, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName.getNamespaceAsString()), jamonWriter); // 455, 51 jamonWriter.write(""); // 456, 70 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName.getQualifierAsString()), jamonWriter); // 456, 108 jamonWriter.write(" "); // 458, 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); // 458, 150 jamonWriter.write(""); // 460, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openRegionsCount), jamonWriter); // 460, 35 jamonWriter.write(""); // 461, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(offlineRegionsCount), jamonWriter); // 461, 38 jamonWriter.write(""); // 462, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(failedRegionsCount), jamonWriter); // 462, 37 jamonWriter.write(""); // 463, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(splitRegionsCount), jamonWriter); // 463, 36 jamonWriter.write(""); // 464, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(otherRegionsCount), jamonWriter); // 464, 36 jamonWriter.write(""); // 465, 13 org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(htDesc.toStringCustomizedValues()), jamonWriter); // 465, 52 jamonWriter.write("
\n"); } // 470, 7 jamonWriter.write("\n"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy