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 java.io.IOException;
// 34, 1
import org.apache.hadoop.hbase.client.replication.ReplicationPeerConfigUtil;
// 35, 1
import org.apache.hadoop.hbase.client.RegionInfo;
// 36, 1
import org.apache.hadoop.hbase.client.TableDescriptor;
// 37, 1
import org.apache.hadoop.hbase.replication.ReplicationPeerConfig;
// 38, 1
import org.apache.hadoop.hbase.replication.ReplicationPeerDescription;
// 39, 1
import org.apache.hadoop.hbase.HBaseConfiguration;
// 40, 1
import org.apache.hadoop.hbase.HConstants;
// 41, 1
import org.apache.hadoop.hbase.HTableDescriptor;
// 42, 1
import org.apache.hadoop.hbase.NamespaceDescriptor;
// 43, 1
import org.apache.hadoop.hbase.ServerName;
// 44, 1
import org.apache.hadoop.hbase.TableName;
// 45, 1
import org.apache.hadoop.hbase.client.Admin;
// 46, 1
import org.apache.hadoop.hbase.client.MasterSwitchType;
// 47, 1
import org.apache.hadoop.hbase.client.TableState;
// 48, 1
import org.apache.hadoop.hbase.master.assignment.AssignmentManager;
// 49, 1
import org.apache.hadoop.hbase.master.DeadServer;
// 50, 1
import org.apache.hadoop.hbase.master.HMaster;
// 51, 1
import org.apache.hadoop.hbase.master.RegionState;
// 52, 1
import org.apache.hadoop.hbase.master.ServerManager;
// 53, 1
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
// 54, 1
import org.apache.hadoop.hbase.quotas.QuotaUtil;
// 55, 1
import org.apache.hadoop.hbase.security.access.PermissionStorage;
// 56, 1
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants;
// 57, 1
import org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription;
// 58, 1
import org.apache.hadoop.hbase.tool.CanaryTool;
// 59, 1
import org.apache.hadoop.hbase.util.Bytes;
// 60, 1
import org.apache.hadoop.hbase.util.CommonFSUtils;
// 61, 1
import org.apache.hadoop.hbase.util.JvmVersion;
// 62, 1
import org.apache.hadoop.hbase.util.PrettyPrinter;
// 63, 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;
// 75, 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();
}
// 102, 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
{
// 66, 1
if (format.equals("json") )
{
// 66, 30
jamonWriter.write("\n ");
// 67, 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);
}
// 67, 68
jamonWriter.write("\n ");
// 68, 3
return;
}
// 69, 7
jamonWriter.write("\n");
// 70, 1
ServerManager serverManager = master.getServerManager();
AssignmentManager assignmentManager = master.getAssignmentManager();
// 122, 1
jamonWriter.write("\n\n\n \n \n ");
// 127, 12
if (master.isActiveMaster() )
{
// 127, 43
jamonWriter.write("Master: ");
}
// 127, 51
else
{
// 127, 58
jamonWriter.write("Backup Master: ");
}
// 127, 79
jamonWriter.write("\n ");
// 128, 5
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerName().getHostname()), jamonWriter);
// 128, 47
jamonWriter.write(" \n \n \n \n \n \n \n\n \n\n \n\n \n\t");
// 174, 2
if (master.isActiveMaster() )
{
// 174, 33
jamonWriter.write("\n \n \n Master ");
// 177, 35
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerName().getHostname()), jamonWriter);
// 177, 77
jamonWriter.write("
\n \n \n\n \n \n ");
// 183, 9
if (JvmVersion.isBadJvmVersion() )
{
// 183, 45
jamonWriter.write("\n \n Your current JVM version ");
// 185, 36
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(System.getProperty("java.version")), jamonWriter);
// 185, 76
jamonWriter.write(" is known to be\n unstable with HBase. Please see the\n HBase Reference Guide\n for details.\n \n ");
}
// 190, 15
jamonWriter.write("\n ");
// 191, 9
if (master.isInitialized() && !catalogJanitorEnabled )
{
// 191, 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 ");
}
// 196, 15
jamonWriter.write("\n ");
// 197, 9
if (master.isInMaintenanceMode() )
{
// 197, 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 ");
}
// 202, 15
jamonWriter.write("\n ");
// 203, 9
if (!master.isBalancerOn() )
{
// 203, 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 ");
}
// 209, 15
jamonWriter.write("\n ");
// 210, 9
if (!master.isSplitOrMergeEnabled(MasterSwitchType.SPLIT) )
{
// 210, 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 ");
}
// 216, 15
jamonWriter.write("\n ");
// 217, 9
if (!master.isSplitOrMergeEnabled(MasterSwitchType.MERGE) )
{
// 217, 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 ");
}
// 223, 15
jamonWriter.write("\n ");
// 224, 9
if (master.getAssignmentManager() != null )
{
// 224, 54
jamonWriter.write("\n ");
// 225, 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());
}
// 225, 92
jamonWriter.write("\n ");
}
// 226, 15
jamonWriter.write("\n ");
// 227, 9
if (!master.isInMaintenanceMode() && master.getMasterCoprocessorHost() != null )
{
// 227, 91
jamonWriter.write("\n ");
// 228, 11
if (master.getMasterCoprocessorHost().findCoprocessor("RSGroupAdminEndpoint") != null &&
serverManager.getOnlineServersList().size() > 0 )
{
// 229, 63
jamonWriter.write("\n \n RSGroup
\n ");
// 232, 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);
}
// 232, 81
jamonWriter.write("\n \n ");
}
// 234, 17
jamonWriter.write("\n ");
}
// 235, 15
jamonWriter.write("\n \n Region Servers
\n ");
// 238, 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);
}
// 238, 74
jamonWriter.write("\n\n ");
// 240, 13
if ((deadServers != null) )
{
// 240, 42
jamonWriter.write("\n ");
// 241, 17
{
// 241, 17
__jamon_innerUnit__deadRegionServers(jamonWriter);
}
// 241, 40
jamonWriter.write("\n ");
}
// 242, 19
jamonWriter.write("\n \n \n ");
// 245, 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 );
}
// 245, 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 ");
// 263, 25
if ((metaLocation != null) )
{
// 263, 55
jamonWriter.write("\n ");
// 264, 29
{
// 264, 29
__jamon_innerUnit__userTables(jamonWriter);
}
// 264, 45
jamonWriter.write("\n ");
}
// 265, 31
jamonWriter.write("\n \n \n ");
// 268, 25
if ((metaLocation != null) )
{
// 268, 55
jamonWriter.write("\n ");
// 269, 29
{
// 269, 29
__jamon_innerUnit__catalogTables(jamonWriter);
}
// 269, 48
jamonWriter.write("\n ");
}
// 270, 31
jamonWriter.write("\n \n \n ");
// 273, 25
{
// 273, 25
__jamon_innerUnit__userSnapshots(jamonWriter);
}
// 273, 44
jamonWriter.write("\n \n \n \n \n \n Peers
\n ");
// 280, 13
{
// 280, 13
__jamon_innerUnit__peerConfigs(jamonWriter);
}
// 280, 30
jamonWriter.write("\n \n\t");
}
// 282, 2
else
{
// 282, 9
jamonWriter.write("\n \n ");
// 284, 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 );
}
// 284, 58
jamonWriter.write("\n \n\t");
}
// 286, 8
jamonWriter.write("\n\n\n \n ");
// 290, 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);
}
// 290, 88
jamonWriter.write("\n \n\n \n Software Attributes
\n \n \n Attribute Name \n Value \n Description \n \n \n JVM Version \n ");
// 303, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(JvmVersion.getVersion()), jamonWriter);
// 303, 54
jamonWriter.write(" \n JVM vendor and version \n \n \n HBase Version \n ");
// 308, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getVersion()), jamonWriter);
// 308, 84
jamonWriter.write(", revision=");
// 308, 95
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getRevision()), jamonWriter);
// 308, 155
jamonWriter.write(" HBase version and revision \n \n \n HBase Compiled \n ");
// 312, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getDate()), jamonWriter);
// 312, 81
jamonWriter.write(", ");
// 312, 83
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getUser()), jamonWriter);
// 312, 139
jamonWriter.write(" \n When HBase version was compiled and by whom \n \n \n HBase Source Checksum \n ");
// 317, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getSrcChecksum()), jamonWriter);
// 317, 88
jamonWriter.write(" \n HBase source SHA512 checksum \n \n \n Hadoop Version \n ");
// 322, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getVersion()), jamonWriter);
// 322, 78
jamonWriter.write(", revision=");
// 322, 89
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getRevision()), jamonWriter);
// 322, 143
jamonWriter.write(" \n Hadoop version and revision \n \n \n Hadoop Compiled \n ");
// 327, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getDate()), jamonWriter);
// 327, 75
jamonWriter.write(", ");
// 327, 77
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getUser()), jamonWriter);
// 327, 127
jamonWriter.write(" \n When Hadoop version was compiled and by whom \n \n \n Hadoop Source Checksum \n ");
// 332, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getSrcChecksum()), jamonWriter);
// 332, 82
jamonWriter.write(" \n Hadoop source MD5 checksum \n \n \n ZooKeeper Client Version \n ");
// 337, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getVersion()), jamonWriter);
// 337, 72
jamonWriter.write(", revision=");
// 337, 83
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getRevisionHash()), jamonWriter);
// 337, 135
jamonWriter.write(" \n ZooKeeper client version and revision hash \n \n \n ZooKeeper Client Compiled \n ");
// 342, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getBuildDate()), jamonWriter);
// 342, 74
jamonWriter.write(" \n When ZooKeeper client version was compiled \n \n \n ZooKeeper Quorum \n ");
// 348, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter);
// 348, 48
jamonWriter.write(" \n Addresses of all registered ZK servers. For more, see zk dump. \n \n \n ZooKeeper Base Path \n ");
// 353, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getZooKeeper().getZNodePaths().baseZNode), jamonWriter);
// 353, 79
jamonWriter.write(" \n Root node of this cluster in ZK. \n \n \n Cluster Key \n ");
// 358, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter);
// 358, 48
jamonWriter.write(":");
// 358, 49
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getZooKeeper().getZNodePaths().baseZNode), jamonWriter);
// 358, 102
jamonWriter.write(" \n Key to add this cluster as a peer for replication. Use 'help \"add_peer\"' in the shell for details. \n \n \n HBase Root Directory \n ");
// 363, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(CommonFSUtils.getRootDir(master.getConfiguration()).toString()), jamonWriter);
// 363, 93
jamonWriter.write(" \n Location of HBase home directory \n \n \n HMaster Start Time \n ");
// 368, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterStartTime())), jamonWriter);
// 368, 68
jamonWriter.write(" \n Date stamp of when this HMaster was started \n \n ");
// 371, 17
if (master.isActiveMaster() )
{
// 371, 48
jamonWriter.write("\n\t \n\t HMaster Active Time \n\t ");
// 374, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterActiveTime())), jamonWriter);
// 374, 70
jamonWriter.write(" \n\t Date stamp of when this HMaster became active \n\t \n\t \n\t HBase Cluster ID \n\t ");
// 379, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getClusterId() != null ? master.getClusterId() : "Not set"), jamonWriter);
// 379, 97
jamonWriter.write(" \n\t Unique identifier generated for each HBase cluster \n\t \n\t \n\t Load average \n\t ");
// 384, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerManager() == null ? "0.00" :
StringUtils.limitDecimalTo2(master.getServerManager().getAverageLoad())), jamonWriter);
// 385, 98
jamonWriter.write(" \n\t Average number of regions per regionserver. Naive computation. \n\t \n\t ");
// 388, 18
if (frags != null )
{
// 388, 39
jamonWriter.write("\n\t \n\t Fragmentation \n\t ");
// 391, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get("-TOTAL-") != null ? frags.get("-TOTAL-").intValue() + "%" : "n/a"), jamonWriter);
// 391, 108
jamonWriter.write(" \n\t Overall fragmentation of all tables, including hbase:meta \n\t \n\t ");
}
// 394, 24
jamonWriter.write("\n\t \n\t Coprocessors \n\t ");
// 397, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getMasterCoprocessorHost() == null ? "[]" :
java.util.Arrays.toString(master.getMasterCoprocessors())), jamonWriter);
// 398, 84
jamonWriter.write(" \n\t Coprocessors currently loaded by the master \n\t \n\t \n\t LoadBalancer \n\t ");
// 403, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getLoadBalancerClassName()), jamonWriter);
// 403, 65
jamonWriter.write(" \n\t LoadBalancer to be used in the Master \n\t \n ");
}
// 406, 23
jamonWriter.write("\n
\n \n \n \n\n \n \n \n \n \n \n \n \n\n\n");
}
// 529, 1
private void __jamon_innerUnit__catalogTables(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 530, 1
List sysTables = master.isInitialized() ?
master.listTableDescriptorsByNamespace(NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR) : null;
// 534, 1
if ((sysTables != null && sysTables.size() > 0))
{
// 534, 51
jamonWriter.write("\n\n\n Table Name \n ");
// 538, 5
if ((frags != null) )
{
// 538, 28
jamonWriter.write("\n Frag. \n ");
}
// 540, 11
jamonWriter.write("\n Description \n \n");
// 543, 1
for (TableDescriptor systemTable : sysTables)
{
// 543, 48
jamonWriter.write("\n\n");
// 545, 1
TableName tableName = systemTable.getTableName();
// 546, 5
jamonWriter.write("");
// 546, 50
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName), jamonWriter);
// 546, 65
jamonWriter.write(" \n ");
// 547, 5
if ((frags != null))
{
// 547, 27
jamonWriter.write("\n ");
// 548, 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);
// 549, 37
jamonWriter.write(" \n ");
}
// 550, 11
jamonWriter.write("\n ");
// 551, 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.";
}
// 573, 5
jamonWriter.write("");
// 573, 9
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(description), jamonWriter);
// 573, 26
jamonWriter.write(" \n \n");
}
// 575, 8
jamonWriter.write("\n
\n");
}
// 577, 7
jamonWriter.write("\n");
}
// 700, 1
private void __jamon_innerUnit__deadRegionServers(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 702, 1
if ((deadServers != null && deadServers.size() > 0))
{
// 702, 55
jamonWriter.write("\nDead Region Servers
\n\n \n \n ServerName \n Stop time \n \n ");
// 710, 5
DeadServer deadServerUtil = master.getServerManager().getDeadServers();
ServerName [] deadServerNames = deadServers.toArray(new ServerName[deadServers.size()]);
Arrays.sort(deadServerNames);
for (ServerName deadServerName: deadServerNames) {
// 716, 5
jamonWriter.write("\n \t \n ");
// 718, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerName), jamonWriter);
// 718, 33
jamonWriter.write(" \n ");
// 719, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerUtil.getTimeOfDeath(deadServerName)), jamonWriter);
// 719, 64
jamonWriter.write(" \n \n ");
// 721, 5
}
// 724, 5
jamonWriter.write("\n Total: \n servers: ");
// 726, 22
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServers.size()), jamonWriter);
// 726, 46
jamonWriter.write(" \n \n \n
\n");
}
// 730, 7
jamonWriter.write("\n");
}
// 733, 1
private void __jamon_innerUnit__peerConfigs(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 734, 1
List peers = null;
if (master.getReplicationPeerManager() != null) {
peers = master.getReplicationPeerManager().listPeers(null);
}
// 740, 1
jamonWriter.write("\n \n Peer Id \n Cluster Key \n Endpoint \n State \n IsSerial \n Bandwidth \n ReplicateAll \n Namespaces \n Exclude Namespaces \n Table Cfs \n Exclude Table Cfs \n \n");
// 754, 1
if ((peers != null && peers.size() > 0))
{
// 754, 43
jamonWriter.write("\n ");
// 755, 5
for (ReplicationPeerDescription peer : peers )
{
// 755, 53
jamonWriter.write("\n ");
// 756, 5
String peerId = peer.getPeerId();
ReplicationPeerConfig peerConfig = peer.getPeerConfig();
// 760, 5
jamonWriter.write("\n ");
// 761, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerId), jamonWriter);
// 761, 25
jamonWriter.write(" \n ");
// 762, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getClusterKey()), jamonWriter);
// 762, 45
jamonWriter.write(" \n ");
// 763, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getReplicationEndpointImpl()), jamonWriter);
// 763, 58
jamonWriter.write(" \n ");
// 764, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peer.isEnabled() ? "ENABLED" : "DISABLED"), jamonWriter);
// 764, 60
jamonWriter.write(" \n ");
// 765, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.isSerial()), jamonWriter);
// 765, 40
jamonWriter.write(" \n ");
// 766, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getBandwidth() == 0? "UNLIMITED" : StringUtils.humanReadableInt(peerConfig.getBandwidth())), jamonWriter);
// 766, 120
jamonWriter.write(" \n ");
// 767, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.replicateAllUserTables()), jamonWriter);
// 767, 54
jamonWriter.write(" \n \n ");
// 769, 12
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getNamespaces() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getNamespaces()).replaceAll(";", "; ")), jamonWriter);
// 769, 151
jamonWriter.write("\n \n \n ");
// 772, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getExcludeNamespaces() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getExcludeNamespaces()).replaceAll(";", "; ")), jamonWriter);
// 772, 166
jamonWriter.write("\n \n \n ");
// 775, 12
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getTableCFsMap() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getTableCFsMap()).replaceAll(";", "; ")), jamonWriter);
// 775, 153
jamonWriter.write("\n \n \n ");
// 778, 12
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getExcludeTableCFsMap() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getExcludeTableCFsMap()).replaceAll(";", "; ")), jamonWriter);
// 778, 167
jamonWriter.write("\n \n \n ");
}
// 781, 12
jamonWriter.write("\n");
}
// 782, 7
jamonWriter.write("\nTotal: ");
// 783, 16
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf((peers != null) ? peers.size() : 0), jamonWriter);
// 783, 56
jamonWriter.write(" \n
\n");
}
// 664, 1
private void __jamon_innerUnit__userSnapshots(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 665, 1
List snapshots = master.isInitialized() ?
master.getSnapshotManager().getCompletedSnapshots() : null;
// 669, 1
if ((snapshots != null && snapshots.size() > 0))
{
// 669, 51
jamonWriter.write("\n\n \n Snapshot Name \n Table \n Creation Time \n Owner \n TTL \n \n ");
// 678, 5
for (SnapshotDescription snapshotDesc : snapshots)
{
// 678, 57
jamonWriter.write("\n ");
// 679, 5
TableName snapshotTable = TableName.valueOf(snapshotDesc.getTable());
// 682, 5
jamonWriter.write("\n ");
// 683, 70
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getName()), jamonWriter);
// 683, 98
jamonWriter.write(" \n ");
// 684, 76
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotTable.getNameAsString()), jamonWriter);
// 684, 113
jamonWriter.write("\n \n ");
// 686, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(snapshotDesc.getCreationTime())), jamonWriter);
// 686, 59
jamonWriter.write(" \n ");
// 687, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getOwner()), jamonWriter);
// 687, 42
jamonWriter.write(" \n\n \n ");
// 690, 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);
// 690, 150
jamonWriter.write("\n \n \n ");
}
// 693, 12
jamonWriter.write("\n ");
// 694, 8
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshots.size()), jamonWriter);
// 694, 30
jamonWriter.write(" snapshot(s) in set. [Snapshot Storefile stats]
\n
\n");
}
// 696, 7
jamonWriter.write("\n");
}
// 580, 1
private void __jamon_innerUnit__userTables(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 581, 1
List tables = new ArrayList();
String errorMessage = getUserTables(master, tables);
// 585, 1
if ((tables.size() == 0 && errorMessage != null))
{
// 585, 52
jamonWriter.write("\n ");
// 586, 5
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(errorMessage), jamonWriter);
// 586, 23
jamonWriter.write("
\n");
}
// 587, 7
jamonWriter.write("\n\n");
// 589, 1
if ((tables != null && tables.size() > 0))
{
// 589, 45
jamonWriter.write("\n\n\n \n Namespace \n Name \n ");
// 595, 9
if ((frags != null) )
{
// 595, 32
jamonWriter.write("\n Frag. \n ");
}
// 597, 15
jamonWriter.write("\n State \n Regions \n Description \n \n \n OPEN \n OPENING \n CLOSED \n CLOSING \n OFFLINE \n FAILED \n SPLIT \n Other \n \n\n\n ");
// 614, 5
for (TableDescriptor desc : tables)
{
// 614, 42
jamonWriter.write("\n ");
// 615, 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 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 - openingRegionsCount
- closedRegionsCount - closingRegionsCount;
// 640, 5
jamonWriter.write("\n ");
// 641, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName.getNamespaceAsString()), jamonWriter);
// 641, 51
jamonWriter.write(" \n ");
// 642, 70
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName.getQualifierAsString()), jamonWriter);
// 642, 108
jamonWriter.write(" \n ");
// 643, 9
if ((frags != null) )
{
// 643, 32
jamonWriter.write("\n ");
// 644, 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);
// 644, 150
jamonWriter.write(" \n ");
}
// 645, 15
jamonWriter.write("\n ");
// 646, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableState.getState()), jamonWriter);
// 646, 40
jamonWriter.write(" \n ");
// 647, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openRegionsCount), jamonWriter);
// 647, 35
jamonWriter.write(" \n ");
// 648, 9
if ((openingRegionsCount > 0) )
{
// 648, 42
jamonWriter.write(" ");
// 648, 121
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openingRegionsCount), jamonWriter);
// 648, 146
jamonWriter.write(" ");
}
// 648, 152
else
{
// 648, 159
jamonWriter.write("");
// 648, 163
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openingRegionsCount), jamonWriter);
// 648, 188
jamonWriter.write(" ");
}
// 648, 200
jamonWriter.write("\n ");
// 649, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(closedRegionsCount), jamonWriter);
// 649, 37
jamonWriter.write(" \n ");
// 650, 9
if ((closingRegionsCount > 0) )
{
// 650, 42
jamonWriter.write(" ");
// 650, 121
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(closingRegionsCount), jamonWriter);
// 650, 146
jamonWriter.write(" ");
}
// 650, 152
else
{
// 650, 159
jamonWriter.write("");
// 650, 163
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(closingRegionsCount), jamonWriter);
// 650, 188
jamonWriter.write(" ");
}
// 650, 200
jamonWriter.write("\n ");
// 651, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(offlineRegionsCount), jamonWriter);
// 651, 38
jamonWriter.write(" \n ");
// 652, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(failedRegionsCount), jamonWriter);
// 652, 37
jamonWriter.write(" \n ");
// 653, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(splitRegionsCount), jamonWriter);
// 653, 36
jamonWriter.write(" \n ");
// 654, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(otherRegionsCount), jamonWriter);
// 654, 36
jamonWriter.write(" \n ");
// 655, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(htDesc.toStringCustomizedValues()), jamonWriter);
// 655, 52
jamonWriter.write(" \n \n ");
}
// 657, 12
jamonWriter.write("\n ");
// 658, 8
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tables.size()), jamonWriter);
// 658, 27
jamonWriter.write(" table(s) in set. [Details]
\n \n
\n");
}
// 661, 7
jamonWriter.write("\n");
}
}