org.apache.hadoop.hbase.tmpl.master.MasterStatusTmplImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hbase-server Show documentation
Show all versions of hbase-server Show documentation
Server functionality for HBase
// Autogenerated Jamon implementation
// /Users/sakthi/dev/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
package org.apache.hadoop.hbase.tmpl.master;
// 32, 1
import java.util.*;
// 33, 1
import org.apache.hadoop.util.StringUtils;
// 34, 1
import org.apache.hadoop.hbase.util.Bytes;
// 35, 1
import org.apache.hadoop.hbase.util.JvmVersion;
// 36, 1
import org.apache.hadoop.hbase.util.FSUtils;
// 37, 1
import org.apache.hadoop.hbase.master.HMaster;
// 38, 1
import org.apache.hadoop.hbase.master.AssignmentManager;
// 39, 1
import org.apache.hadoop.hbase.master.ServerManager;
// 40, 1
import org.apache.hadoop.hbase.HConstants;
// 41, 1
import org.apache.hadoop.hbase.NamespaceDescriptor;
// 42, 1
import org.apache.hadoop.hbase.ServerLoad;
// 43, 1
import org.apache.hadoop.hbase.ServerName;
// 44, 1
import org.apache.hadoop.hbase.client.Admin;
// 45, 1
import org.apache.hadoop.hbase.client.HConnectionManager;
// 46, 1
import org.apache.hadoop.hbase.HRegionInfo;
// 47, 1
import org.apache.hadoop.hbase.master.RegionState;
// 48, 1
import org.apache.hadoop.hbase.HTableDescriptor;
// 49, 1
import org.apache.hadoop.hbase.HBaseConfiguration;
// 50, 1
import org.apache.hadoop.hbase.TableName;
// 51, 1
import org.apache.hadoop.hbase.tool.CanaryTool;
// 52, 1
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
// 53, 1
import org.apache.hadoop.hbase.master.DeadServer;
// 54, 1
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
// 55, 1
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants;
// 56, 1
import org.apache.hadoop.hbase.security.access.AccessControlLists;
// 57, 1
import org.apache.hadoop.hbase.quotas.QuotaUtil;
public class MasterStatusTmplImpl
extends org.jamon.AbstractTemplateImpl
implements org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl.Intf
{
private final HMaster master;
private final String format;
private final Map frags;
private final ServerManager serverManager;
private final String filter;
private final AssignmentManager assignmentManager;
private final boolean catalogJanitorEnabled;
private final List servers;
private final Set deadServers;
private final ServerName metaLocation;
// 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.getFormat__IsNotDefault())
{
p_implData.setFormat("html");
}
if(! p_implData.getFrags__IsNotDefault())
{
p_implData.setFrags(null);
}
if(! p_implData.getServerManager__IsNotDefault())
{
p_implData.setServerManager(null);
}
if(! p_implData.getFilter__IsNotDefault())
{
p_implData.setFilter("general");
}
if(! p_implData.getAssignmentManager__IsNotDefault())
{
p_implData.setAssignmentManager(null);
}
if(! p_implData.getCatalogJanitorEnabled__IsNotDefault())
{
p_implData.setCatalogJanitorEnabled(true);
}
if(! p_implData.getServers__IsNotDefault())
{
p_implData.setServers(null);
}
if(! p_implData.getDeadServers__IsNotDefault())
{
p_implData.setDeadServers(null);
}
if(! p_implData.getMetaLocation__IsNotDefault())
{
p_implData.setMetaLocation(null);
}
return p_implData;
}
public MasterStatusTmplImpl(org.jamon.TemplateManager p_templateManager, org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl.ImplData p_implData)
{
super(p_templateManager, __jamon_setOptionalArguments(p_implData));
master = p_implData.getMaster();
format = p_implData.getFormat();
frags = p_implData.getFrags();
serverManager = p_implData.getServerManager();
filter = p_implData.getFilter();
assignmentManager = p_implData.getAssignmentManager();
catalogJanitorEnabled = p_implData.getCatalogJanitorEnabled();
servers = p_implData.getServers();
deadServers = p_implData.getDeadServers();
metaLocation = p_implData.getMetaLocation();
}
@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\t");
// 143, 2
if (master.isActiveMaster() )
{
// 143, 33
jamonWriter.write("\n \n \n Master ");
// 146, 35
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerName().getHostname()), jamonWriter);
// 146, 77
jamonWriter.write("
\n \n \n\n \n \n ");
// 152, 9
if (JvmVersion.isBadJvmVersion() )
{
// 152, 45
jamonWriter.write("\n \n Your current JVM version ");
// 154, 36
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(System.getProperty("java.version")), jamonWriter);
// 154, 76
jamonWriter.write(" is known to be\n unstable with HBase. Please see the\n HBase wiki\n for details.\n \n ");
}
// 159, 15
jamonWriter.write("\n ");
// 160, 9
if (master.isInitialized() && !catalogJanitorEnabled )
{
// 160, 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 ");
}
// 165, 15
jamonWriter.write("\n ");
// 166, 9
if (!master.isBalancerOn() )
{
// 166, 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 ");
}
// 172, 15
jamonWriter.write("\n ");
// 173, 9
if (!master.isSplitOrMergeEnabled(Admin.MasterSwitchType.SPLIT) )
{
// 173, 76
jamonWriter.write("\n \n Region splits are disabled. This may be the result of HBCK aborting while\n running in repair mode. Manually enable splits from the HBase shell,\n or re-run HBCK in repair mode.\n \n ");
}
// 179, 15
jamonWriter.write("\n ");
// 180, 9
if (!master.isSplitOrMergeEnabled(Admin.MasterSwitchType.MERGE) )
{
// 180, 76
jamonWriter.write("\n \n Region merges are disabled. This may be the result of HBCK aborting while\n running in repair mode. Manually enable merges from the HBase shell,\n or re-run HBCK in repair mode.\n \n ");
}
// 186, 15
jamonWriter.write("\n\n \n Region Servers
\n ");
// 190, 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);
}
// 190, 74
jamonWriter.write("\n\n ");
// 192, 13
if ((deadServers != null) )
{
// 192, 42
jamonWriter.write("\n ");
// 193, 17
{
// 193, 17
__jamon_innerUnit__deadRegionServers(jamonWriter);
}
// 193, 40
jamonWriter.write("\n ");
}
// 194, 19
jamonWriter.write("\n \n \n ");
// 197, 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 );
}
// 197, 58
jamonWriter.write("\n \n \n Tables
\n \n \n - \n User Tables\n
\n - \n System Tables\n
\n - \n Snapshots\n
\n
\n \n \n ");
// 215, 25
if ((metaLocation != null) )
{
// 215, 55
jamonWriter.write("\n ");
// 216, 29
{
// 216, 29
__jamon_innerUnit__userTables(jamonWriter);
}
// 216, 45
jamonWriter.write("\n ");
}
// 217, 31
jamonWriter.write("\n \n \n ");
// 220, 25
if ((metaLocation != null) )
{
// 220, 55
jamonWriter.write("\n ");
// 221, 29
{
// 221, 29
__jamon_innerUnit__catalogTables(jamonWriter);
}
// 221, 48
jamonWriter.write("\n ");
}
// 222, 31
jamonWriter.write("\n \n \n ");
// 225, 25
{
// 225, 25
__jamon_innerUnit__userSnapshots(jamonWriter);
}
// 225, 44
jamonWriter.write("\n \n \n \n \n ");
// 230, 9
if (master.getAssignmentManager() != null )
{
// 230, 54
jamonWriter.write("\n ");
// 231, 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());
}
// 231, 90
jamonWriter.write("\n ");
}
// 232, 15
jamonWriter.write("\n\t");
}
// 233, 2
else
{
// 233, 9
jamonWriter.write("\n \n ");
// 235, 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 );
}
// 235, 58
jamonWriter.write("\n \n\t");
}
// 237, 8
jamonWriter.write("\n\n\n \n ");
// 241, 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);
}
// 241, 61
jamonWriter.write("\n \n\n \n Software Attributes
\n \n \n Attribute Name \n Value \n Description \n \n \n HBase Version \n ");
// 254, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getVersion()), jamonWriter);
// 254, 84
jamonWriter.write(", revision=");
// 254, 95
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getRevision()), jamonWriter);
// 254, 155
jamonWriter.write(" HBase version and revision \n \n \n HBase Compiled \n ");
// 258, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getDate()), jamonWriter);
// 258, 81
jamonWriter.write(", ");
// 258, 83
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getUser()), jamonWriter);
// 258, 139
jamonWriter.write(" \n When HBase version was compiled and by whom \n \n \n HBase Source Checksum \n ");
// 263, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getSrcChecksum()), jamonWriter);
// 263, 88
jamonWriter.write(" \n HBase source MD5 checksum \n \n \n Hadoop Version \n ");
// 268, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getVersion()), jamonWriter);
// 268, 78
jamonWriter.write(", revision=");
// 268, 89
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getRevision()), jamonWriter);
// 268, 143
jamonWriter.write(" \n Hadoop version and revision \n \n \n Hadoop Compiled \n ");
// 273, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getDate()), jamonWriter);
// 273, 75
jamonWriter.write(", ");
// 273, 77
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getUser()), jamonWriter);
// 273, 127
jamonWriter.write(" \n When Hadoop version was compiled and by whom \n \n \n Hadoop Source Checksum \n ");
// 278, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getSrcChecksum()), jamonWriter);
// 278, 82
jamonWriter.write(" \n Hadoop source MD5 checksum \n \n \n ZooKeeper Client Version \n ");
// 283, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getVersion()), jamonWriter);
// 283, 72
jamonWriter.write(", revision=");
// 283, 83
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getRevision()), jamonWriter);
// 283, 131
jamonWriter.write(" \n ZooKeeper client version and revision \n \n \n ZooKeeper Client Compiled \n ");
// 288, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getBuildDate()), jamonWriter);
// 288, 74
jamonWriter.write(" \n When ZooKeeper client version was compiled \n \n \n Zookeeper Quorum \n ");
// 294, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter);
// 294, 48
jamonWriter.write(" \n Addresses of all registered ZK servers. For more, see zk dump. \n \n \n Zookeeper Base Path \n ");
// 299, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getZooKeeper().getBaseZNode()), jamonWriter);
// 299, 68
jamonWriter.write(" \n Root node of this cluster in ZK. \n \n \n HBase Root Directory \n ");
// 304, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(FSUtils.getRootDir(master.getConfiguration()).toString()), jamonWriter);
// 304, 87
jamonWriter.write(" \n Location of HBase home directory \n \n \n HMaster Start Time \n ");
// 309, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterStartTime())), jamonWriter);
// 309, 68
jamonWriter.write(" \n Date stamp of when this HMaster was started \n \n ");
// 312, 17
if (master.isActiveMaster() )
{
// 312, 48
jamonWriter.write("\n\t \n\t HMaster Active Time \n\t ");
// 315, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterActiveTime())), jamonWriter);
// 315, 70
jamonWriter.write(" \n\t Date stamp of when this HMaster became active \n\t \n\t \n\t HBase Cluster ID \n\t ");
// 320, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getClusterId() != null ? master.getClusterId() : "Not set"), jamonWriter);
// 320, 97
jamonWriter.write(" \n\t Unique identifier generated for each HBase cluster \n\t \n\t \n\t Load average \n\t ");
// 325, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerManager() == null ? "0.00" :
StringUtils.limitDecimalTo2(master.getServerManager().getAverageLoad())), jamonWriter);
// 326, 98
jamonWriter.write(" \n\t Average number of regions per regionserver. Naive computation. \n\t \n\t ");
// 329, 18
if (frags != null )
{
// 329, 39
jamonWriter.write("\n\t \n\t Fragmentation \n\t ");
// 332, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get("-TOTAL-") != null ? frags.get("-TOTAL-").intValue() + "%" : "n/a"), jamonWriter);
// 332, 108
jamonWriter.write(" \n\t Overall fragmentation of all tables, including hbase:meta \n\t \n\t ");
}
// 335, 24
jamonWriter.write("\n\t \n\t Coprocessors \n\t ");
// 338, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getMasterCoprocessorHost() == null ? "[]" :
java.util.Arrays.toString(master.getMasterCoprocessors())), jamonWriter);
// 339, 84
jamonWriter.write(" \n\t Coprocessors currently loaded by the master \n\t \n\t \n\t LoadBalancer \n\t ");
// 344, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getLoadBalancerClassName()), jamonWriter);
// 344, 65
jamonWriter.write(" \n\t LoadBalancer to be used in the Master \n\t \n ");
}
// 347, 23
jamonWriter.write("\n
\n \n \n \n\n \n \n \n \n\n\n");
}
// 469, 1
private void __jamon_innerUnit__userSnapshots(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 470, 1
List snapshots = null;
try (Admin admin = master.getConnection().getAdmin()) {
snapshots = master.isInitialized() ? admin.listSnapshots() : null;
}
// 476, 1
if ((snapshots != null && snapshots.size() > 0))
{
// 476, 51
jamonWriter.write("\n\n \n Snapshot Name \n Table \n Creation Time \n \n ");
// 483, 5
for (SnapshotDescription snapshotDesc : snapshots)
{
// 483, 57
jamonWriter.write("\n ");
// 484, 5
TableName snapshotTable = TableName.valueOf(snapshotDesc.getTable());
// 487, 5
jamonWriter.write("\n ");
// 488, 70
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getName()), jamonWriter);
// 488, 98
jamonWriter.write(" \n ");
// 489, 76
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotTable.getNameAsString()), jamonWriter);
// 489, 113
jamonWriter.write("\n \n ");
// 491, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(snapshotDesc.getCreationTime())), jamonWriter);
// 491, 59
jamonWriter.write(" \n \n ");
}
// 493, 12
jamonWriter.write("\n ");
// 494, 8
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshots.size()), jamonWriter);
// 494, 30
jamonWriter.write(" snapshot(s) in set. [Snapshot Storefile stats]
\n
\n");
}
// 496, 7
jamonWriter.write("\n");
}
// 359, 1
private void __jamon_innerUnit__catalogTables(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 360, 1
HTableDescriptor[] sysTables = null;
try (Admin admin = master.getConnection().getAdmin()) {
sysTables = master.isInitialized() ? admin.listTableDescriptorsByNamespace(
NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR) : null;
}
// 367, 1
if ((sysTables != null && sysTables.length > 0))
{
// 367, 51
jamonWriter.write("\n\n\n Table Name \n ");
// 371, 5
if ((frags != null) )
{
// 371, 28
jamonWriter.write("\n Frag. \n ");
}
// 373, 11
jamonWriter.write("\n Description \n \n");
// 376, 1
for (HTableDescriptor systemTable : sysTables)
{
// 376, 49
jamonWriter.write("\n\n");
// 378, 1
TableName tableName = systemTable.getTableName();
// 379, 5
jamonWriter.write("");
// 379, 50
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName), jamonWriter);
// 379, 65
jamonWriter.write(" \n ");
// 380, 5
if ((frags != null))
{
// 380, 27
jamonWriter.write("\n ");
// 381, 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);
// 382, 37
jamonWriter.write(" \n ");
}
// 383, 11
jamonWriter.write("\n ");
// 384, 5
String description = null;
if (tableName.equals(TableName.META_TABLE_NAME)){
description = "The hbase:meta table holds references to all User Table regions.";
} else if (tableName.equals(CanaryTool.DEFAULT_WRITE_TABLE_NAME)){
description = "The hbase:canary table is used to sniff the write availbility of"
+ " each regionserver.";
} else if (tableName.equals(AccessControlLists.ACL_TABLE_NAME)){
description = "The hbase:acl table holds information about acl";
} else if (tableName.equals(VisibilityConstants.LABELS_TABLE_NAME)){
description = "The hbase:labels table holds information about visibility labels.";
} else if (tableName.equals(TableName.NAMESPACE_TABLE_NAME)){
description = "The hbase:namespace table holds information about namespaces.";
} else if (tableName.equals(QuotaUtil.QUOTA_TABLE_NAME)){
description = "The hbase:quota table holds quota information about number" +
" or size of requests in a given time frame.";
}
// 401, 5
jamonWriter.write("");
// 401, 9
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(description), jamonWriter);
// 401, 26
jamonWriter.write(" \n \n");
}
// 403, 8
jamonWriter.write("\n
\n");
}
// 405, 7
jamonWriter.write("\n");
}
// 408, 1
private void __jamon_innerUnit__userTables(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 409, 1
HTableDescriptor[] tables = null;
try (Admin admin = master.getConnection().getAdmin()) {
tables = master.isInitialized() ? admin.listTables() : null;
}
// 415, 1
if ((tables != null && tables.length > 0))
{
// 415, 45
jamonWriter.write("\n\n \n Namespace \n Table Name \n ");
// 420, 9
if ((frags != null) )
{
// 420, 32
jamonWriter.write("\n Frag. \n ");
}
// 422, 15
jamonWriter.write("\n Online Regions \n Offline Regions \n Failed Regions \n Split Regions \n Other Regions \n Description \n \n ");
// 430, 5
for (HTableDescriptor htDesc : tables)
{
// 430, 45
jamonWriter.write("\n ");
// 431, 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;
// 450, 5
jamonWriter.write("\n ");
// 451, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName.getNamespaceAsString()), jamonWriter);
// 451, 51
jamonWriter.write(" \n ");
// 452, 70
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName.getQualifierAsString()), jamonWriter);
// 452, 108
jamonWriter.write(" \n ");
// 453, 9
if ((frags != null) )
{
// 453, 32
jamonWriter.write("\n ");
// 454, 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);
// 454, 150
jamonWriter.write(" \n ");
}
// 455, 15
jamonWriter.write("\n ");
// 456, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openRegionsCount), jamonWriter);
// 456, 35
jamonWriter.write(" \n ");
// 457, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(offlineRegionsCount), jamonWriter);
// 457, 38
jamonWriter.write(" \n ");
// 458, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(failedRegionsCount), jamonWriter);
// 458, 37
jamonWriter.write(" \n ");
// 459, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(splitRegionsCount), jamonWriter);
// 459, 36
jamonWriter.write(" \n ");
// 460, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(otherRegionsCount), jamonWriter);
// 460, 36
jamonWriter.write(" \n ");
// 461, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(htDesc.toStringCustomizedValues()), jamonWriter);
// 461, 52
jamonWriter.write(" \n \n ");
}
// 463, 12
jamonWriter.write("\n ");
// 464, 8
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tables.length), jamonWriter);
// 464, 27
jamonWriter.write(" table(s) in set. [Details]
\n
\n");
}
// 466, 7
jamonWriter.write("\n");
}
// 500, 1
private void __jamon_innerUnit__deadRegionServers(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 502, 1
if ((deadServers != null && deadServers.size() > 0))
{
// 502, 55
jamonWriter.write("\nDead Region Servers
\n\n \n \n ServerName \n Stop time \n \n ");
// 510, 5
DeadServer deadServerUtil = master.getServerManager().getDeadServers();
ServerName [] deadServerNames = deadServers.toArray(new ServerName[deadServers.size()]);
Arrays.sort(deadServerNames);
for (ServerName deadServerName: deadServerNames) {
// 516, 5
jamonWriter.write("\n \t \n ");
// 518, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerName), jamonWriter);
// 518, 33
jamonWriter.write(" \n ");
// 519, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerUtil.getTimeOfDeath(deadServerName)), jamonWriter);
// 519, 64
jamonWriter.write(" \n \n ");
// 521, 5
}
// 524, 5
jamonWriter.write("\n Total: \n servers: ");
// 526, 22
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServers.size()), jamonWriter);
// 526, 46
jamonWriter.write(" \n \n \n
\n");
}
// 530, 7
jamonWriter.write("\n");
}
}