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/apurtell/src/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
package org.apache.hadoop.hbase.tmpl.master;
// 32, 1
import java.util.*;
// 33, 1
import 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.Canary;
// 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 List servers;
private final AssignmentManager assignmentManager;
private final ServerName metaLocation;
private final ServerManager serverManager;
private final Set deadServers;
private final Map frags;
private final boolean catalogJanitorEnabled;
private final String filter;
// 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.getServers__IsNotDefault())
{
p_implData.setServers(null);
}
if(! p_implData.getAssignmentManager__IsNotDefault())
{
p_implData.setAssignmentManager(null);
}
if(! p_implData.getMetaLocation__IsNotDefault())
{
p_implData.setMetaLocation(null);
}
if(! p_implData.getServerManager__IsNotDefault())
{
p_implData.setServerManager(null);
}
if(! p_implData.getDeadServers__IsNotDefault())
{
p_implData.setDeadServers(null);
}
if(! p_implData.getFrags__IsNotDefault())
{
p_implData.setFrags(null);
}
if(! p_implData.getCatalogJanitorEnabled__IsNotDefault())
{
p_implData.setCatalogJanitorEnabled(true);
}
if(! p_implData.getFilter__IsNotDefault())
{
p_implData.setFilter("general");
}
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();
servers = p_implData.getServers();
assignmentManager = p_implData.getAssignmentManager();
metaLocation = p_implData.getMetaLocation();
serverManager = p_implData.getServerManager();
deadServers = p_implData.getDeadServers();
frags = p_implData.getFrags();
catalogJanitorEnabled = p_implData.getCatalogJanitorEnabled();
filter = p_implData.getFilter();
}
@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");
// 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 wiki\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.isInMaintenanceMode() )
{
// 165, 45
jamonWriter.write("\n \n Your Master is in maintenance mode. This may be because of HBCK aborting while\n running in repair mode. Please re-run HBCK in repair mode.\n \n ");
}
// 170, 15
jamonWriter.write("\n ");
// 171, 9
if (!master.isBalancerOn() )
{
// 171, 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 ");
}
// 177, 15
jamonWriter.write("\n ");
// 178, 9
if (!master.isSplitOrMergeEnabled(Admin.MasterSwitchType.SPLIT) )
{
// 178, 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 ");
}
// 184, 15
jamonWriter.write("\n ");
// 185, 9
if (!master.isSplitOrMergeEnabled(Admin.MasterSwitchType.MERGE) )
{
// 185, 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 ");
}
// 191, 15
jamonWriter.write("\n\n \n Region Servers
\n ");
// 195, 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);
}
// 195, 74
jamonWriter.write("\n\n ");
// 197, 13
if ((deadServers != null) )
{
// 197, 42
jamonWriter.write("\n ");
// 198, 17
{
// 198, 17
__jamon_innerUnit__deadRegionServers(jamonWriter);
}
// 198, 40
jamonWriter.write("\n ");
}
// 199, 19
jamonWriter.write("\n \n \n ");
// 202, 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 );
}
// 202, 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 ");
// 220, 25
if ((metaLocation != null) )
{
// 220, 55
jamonWriter.write("\n ");
// 221, 29
{
// 221, 29
__jamon_innerUnit__userTables(jamonWriter);
}
// 221, 45
jamonWriter.write("\n ");
}
// 222, 31
jamonWriter.write("\n \n \n ");
// 225, 25
if ((metaLocation != null) )
{
// 225, 55
jamonWriter.write("\n ");
// 226, 29
{
// 226, 29
__jamon_innerUnit__catalogTables(jamonWriter);
}
// 226, 48
jamonWriter.write("\n ");
}
// 227, 31
jamonWriter.write("\n \n \n ");
// 230, 25
{
// 230, 25
__jamon_innerUnit__userSnapshots(jamonWriter);
}
// 230, 44
jamonWriter.write("\n \n \n \n \n ");
// 235, 9
if (master.getAssignmentManager() != null )
{
// 235, 54
jamonWriter.write("\n ");
// 236, 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());
}
// 236, 90
jamonWriter.write("\n ");
}
// 237, 15
jamonWriter.write("\n\t");
}
// 238, 2
else
{
// 238, 9
jamonWriter.write("\n \n ");
// 240, 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 );
}
// 240, 58
jamonWriter.write("\n \n\t");
}
// 242, 8
jamonWriter.write("\n\n\n \n ");
// 246, 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);
}
// 246, 61
jamonWriter.write("\n \n\n \n Software Attributes
\n \n \n Attribute Name \n Value \n Description \n \n \n HBase Version \n ");
// 259, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getVersion()), jamonWriter);
// 259, 84
jamonWriter.write(", revision=");
// 259, 95
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getRevision()), jamonWriter);
// 259, 155
jamonWriter.write(" HBase version and revision \n \n \n HBase Compiled \n ");
// 263, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getDate()), jamonWriter);
// 263, 81
jamonWriter.write(", ");
// 263, 83
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getUser()), jamonWriter);
// 263, 139
jamonWriter.write(" \n When HBase version was compiled and by whom \n \n \n HBase Source Checksum \n ");
// 268, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getSrcChecksum()), jamonWriter);
// 268, 88
jamonWriter.write(" \n HBase source MD5 checksum \n \n \n Hadoop Version \n ");
// 273, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getVersion()), jamonWriter);
// 273, 78
jamonWriter.write(", revision=");
// 273, 89
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getRevision()), jamonWriter);
// 273, 143
jamonWriter.write(" \n Hadoop version and revision \n \n \n Hadoop Compiled \n ");
// 278, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getDate()), jamonWriter);
// 278, 75
jamonWriter.write(", ");
// 278, 77
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getUser()), jamonWriter);
// 278, 127
jamonWriter.write(" \n When Hadoop version was compiled and by whom \n \n \n Hadoop Source Checksum \n ");
// 283, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getSrcChecksum()), jamonWriter);
// 283, 82
jamonWriter.write(" \n Hadoop source MD5 checksum \n \n \n ZooKeeper Client Version \n ");
// 288, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getVersion()), jamonWriter);
// 288, 72
jamonWriter.write(", revision=");
// 288, 83
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getRevision()), jamonWriter);
// 288, 131
jamonWriter.write(" \n ZooKeeper client version and revision \n \n \n ZooKeeper Client Compiled \n ");
// 293, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getBuildDate()), jamonWriter);
// 293, 74
jamonWriter.write(" \n When ZooKeeper client version was compiled \n \n \n Zookeeper Quorum \n ");
// 299, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter);
// 299, 48
jamonWriter.write(" \n Addresses of all registered ZK servers. For more, see zk dump. \n \n \n Zookeeper Base Path \n ");
// 304, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getZooKeeper().getBaseZNode()), jamonWriter);
// 304, 68
jamonWriter.write(" \n Root node of this cluster in ZK. \n \n \n HBase Root Directory \n ");
// 309, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(FSUtils.getRootDir(master.getConfiguration()).toString()), jamonWriter);
// 309, 87
jamonWriter.write(" \n Location of HBase home directory \n \n \n HMaster Start Time \n ");
// 314, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterStartTime())), jamonWriter);
// 314, 68
jamonWriter.write(" \n Date stamp of when this HMaster was started \n \n ");
// 317, 17
if (master.isActiveMaster() )
{
// 317, 48
jamonWriter.write("\n\t \n\t HMaster Active Time \n\t ");
// 320, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterActiveTime())), jamonWriter);
// 320, 70
jamonWriter.write(" \n\t Date stamp of when this HMaster became active \n\t \n\t \n\t HBase Cluster ID \n\t ");
// 325, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getClusterId() != null ? master.getClusterId() : "Not set"), jamonWriter);
// 325, 97
jamonWriter.write(" \n\t Unique identifier generated for each HBase cluster \n\t \n\t \n\t Load average \n\t ");
// 330, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerManager() == null ? "0.00" :
StringUtils.limitDecimalTo2(master.getServerManager().getAverageLoad())), jamonWriter);
// 331, 98
jamonWriter.write(" \n\t Average number of regions per regionserver. Naive computation. \n\t \n\t ");
// 334, 18
if (frags != null )
{
// 334, 39
jamonWriter.write("\n\t \n\t Fragmentation \n\t ");
// 337, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get("-TOTAL-") != null ? frags.get("-TOTAL-").intValue() + "%" : "n/a"), jamonWriter);
// 337, 108
jamonWriter.write(" \n\t Overall fragmentation of all tables, including hbase:meta \n\t \n\t ");
}
// 340, 24
jamonWriter.write("\n\t \n\t Coprocessors \n\t ");
// 343, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getMasterCoprocessorHost() == null ? "[]" :
java.util.Arrays.toString(master.getMasterCoprocessors())), jamonWriter);
// 344, 84
jamonWriter.write(" \n\t Coprocessors currently loaded by the master \n\t \n\t \n\t LoadBalancer \n\t ");
// 349, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getLoadBalancerClassName()), jamonWriter);
// 349, 65
jamonWriter.write(" \n\t LoadBalancer to be used in the Master \n\t \n ");
}
// 352, 23
jamonWriter.write("\n
\n \n \n \n\n \n \n \n \n\n\n");
}
// 476, 1
private void __jamon_innerUnit__userSnapshots(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 477, 1
List snapshots = null;
try (Admin admin = master.getConnection().getAdmin()) {
snapshots = master.isInitialized() ? admin.listSnapshots() : null;
}
// 483, 1
if ((snapshots != null && snapshots.size() > 0))
{
// 483, 51
jamonWriter.write("\n\n \n Snapshot Name \n Table \n Creation Time \n \n ");
// 490, 5
for (SnapshotDescription snapshotDesc : snapshots)
{
// 490, 57
jamonWriter.write("\n ");
// 491, 5
TableName snapshotTable = TableName.valueOf(snapshotDesc.getTable());
// 494, 5
jamonWriter.write("\n ");
// 495, 70
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getName()), jamonWriter);
// 495, 98
jamonWriter.write(" \n ");
// 496, 76
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotTable.getNameAsString()), jamonWriter);
// 496, 113
jamonWriter.write("\n \n ");
// 498, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(snapshotDesc.getCreationTime())), jamonWriter);
// 498, 59
jamonWriter.write(" \n \n ");
}
// 500, 12
jamonWriter.write("\n ");
// 501, 8
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshots.size()), jamonWriter);
// 501, 30
jamonWriter.write(" snapshot(s) in set. [Snapshot Storefile stats]
\n
\n");
}
// 503, 7
jamonWriter.write("\n");
}
// 364, 1
private void __jamon_innerUnit__catalogTables(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 365, 1
HTableDescriptor[] sysTables = null;
try (Admin admin = master.getConnection().getAdmin()) {
sysTables = master.isInitialized() ? admin.listTableDescriptorsByNamespace(
NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR) : null;
}
// 372, 1
if ((sysTables != null && sysTables.length > 0))
{
// 372, 51
jamonWriter.write("\n\n\n Table Name \n ");
// 376, 5
if ((frags != null) )
{
// 376, 28
jamonWriter.write("\n Frag. \n ");
}
// 378, 11
jamonWriter.write("\n Description \n \n");
// 381, 1
for (HTableDescriptor systemTable : sysTables)
{
// 381, 49
jamonWriter.write("\n\n");
// 383, 1
TableName tableName = systemTable.getTableName();
// 384, 5
jamonWriter.write("");
// 384, 50
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName), jamonWriter);
// 384, 65
jamonWriter.write(" \n ");
// 385, 5
if ((frags != null))
{
// 385, 27
jamonWriter.write("\n ");
// 386, 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);
// 387, 37
jamonWriter.write(" \n ");
}
// 388, 11
jamonWriter.write("\n ");
// 389, 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";
}
// 408, 5
jamonWriter.write("");
// 408, 9
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(description), jamonWriter);
// 408, 26
jamonWriter.write(" \n \n");
}
// 410, 8
jamonWriter.write("\n
\n");
}
// 412, 7
jamonWriter.write("\n");
}
// 415, 1
private void __jamon_innerUnit__userTables(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 416, 1
HTableDescriptor[] tables = null;
try (Admin admin = master.getConnection().getAdmin()) {
tables = master.isInitialized() ? admin.listTables() : null;
}
// 422, 1
if ((tables != null && tables.length > 0))
{
// 422, 45
jamonWriter.write("\n\n \n Namespace \n Table Name \n ");
// 427, 9
if ((frags != null) )
{
// 427, 32
jamonWriter.write("\n Frag. \n ");
}
// 429, 15
jamonWriter.write("\n Online Regions \n Offline Regions \n Failed Regions \n Split Regions \n Other Regions \n Description \n \n ");
// 437, 5
for (HTableDescriptor htDesc : tables)
{
// 437, 45
jamonWriter.write("\n ");
// 438, 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;
// 457, 5
jamonWriter.write("\n ");
// 458, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName.getNamespaceAsString()), jamonWriter);
// 458, 51
jamonWriter.write(" \n ");
// 459, 70
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName.getQualifierAsString()), jamonWriter);
// 459, 108
jamonWriter.write(" \n ");
// 460, 9
if ((frags != null) )
{
// 460, 32
jamonWriter.write("\n ");
// 461, 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);
// 461, 150
jamonWriter.write(" \n ");
}
// 462, 15
jamonWriter.write("\n ");
// 463, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openRegionsCount), jamonWriter);
// 463, 35
jamonWriter.write(" \n ");
// 464, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(offlineRegionsCount), jamonWriter);
// 464, 38
jamonWriter.write(" \n ");
// 465, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(failedRegionsCount), jamonWriter);
// 465, 37
jamonWriter.write(" \n ");
// 466, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(splitRegionsCount), jamonWriter);
// 466, 36
jamonWriter.write(" \n ");
// 467, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(otherRegionsCount), jamonWriter);
// 467, 36
jamonWriter.write(" \n ");
// 468, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(htDesc.toStringCustomizedValues()), jamonWriter);
// 468, 52
jamonWriter.write(" \n \n ");
}
// 470, 12
jamonWriter.write("\n ");
// 471, 8
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tables.length), jamonWriter);
// 471, 27
jamonWriter.write(" table(s) in set. [Details]
\n
\n");
}
// 473, 7
jamonWriter.write("\n");
}
// 507, 1
private void __jamon_innerUnit__deadRegionServers(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 509, 1
if ((deadServers != null && deadServers.size() > 0))
{
// 509, 55
jamonWriter.write("\nDead Region Servers
\n\n \n \n ServerName \n Stop time \n \n ");
// 517, 5
DeadServer deadServerUtil = master.getServerManager().getDeadServers();
ServerName [] deadServerNames = deadServers.toArray(new ServerName[deadServers.size()]);
Arrays.sort(deadServerNames);
for (ServerName deadServerName: deadServerNames) {
// 523, 5
jamonWriter.write("\n \t \n ");
// 525, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerName), jamonWriter);
// 525, 33
jamonWriter.write(" \n ");
// 526, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerUtil.getTimeOfDeath(deadServerName)), jamonWriter);
// 526, 64
jamonWriter.write(" \n \n ");
// 528, 5
}
// 531, 5
jamonWriter.write("\n Total: \n servers: ");
// 533, 22
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServers.size()), jamonWriter);
// 533, 46
jamonWriter.write(" \n \n \n
\n");
}
// 537, 7
jamonWriter.write("\n");
}
}