Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.apache.hadoop.hbase.tmpl.master.MasterStatusTmplImpl Maven / Gradle / Ivy
// Autogenerated Jamon implementation
// /home/vagrant/hbase-rm/output/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
package org.apache.hadoop.hbase.tmpl.master;
// 32, 1
import java.util.*;
// 33, 1
import java.net.URLEncoder;
// 34, 1
import java.io.IOException;
// 35, 1
import org.apache.hadoop.hbase.client.replication.ReplicationPeerConfigUtil;
// 36, 1
import org.apache.hadoop.hbase.client.RegionInfo;
// 37, 1
import org.apache.hadoop.hbase.client.TableDescriptor;
// 38, 1
import org.apache.hadoop.hbase.replication.ReplicationPeerConfig;
// 39, 1
import org.apache.hadoop.hbase.replication.ReplicationPeerDescription;
// 40, 1
import org.apache.hadoop.hbase.HBaseConfiguration;
// 41, 1
import org.apache.hadoop.hbase.HConstants;
// 42, 1
import org.apache.hadoop.hbase.HTableDescriptor;
// 43, 1
import org.apache.hadoop.hbase.NamespaceDescriptor;
// 44, 1
import org.apache.hadoop.hbase.ServerName;
// 45, 1
import org.apache.hadoop.hbase.TableName;
// 46, 1
import org.apache.hadoop.hbase.client.Admin;
// 47, 1
import org.apache.hadoop.hbase.client.MasterSwitchType;
// 48, 1
import org.apache.hadoop.hbase.client.TableState;
// 49, 1
import org.apache.hadoop.hbase.master.assignment.AssignmentManager;
// 50, 1
import org.apache.hadoop.hbase.master.DeadServer;
// 51, 1
import org.apache.hadoop.hbase.master.HMaster;
// 52, 1
import org.apache.hadoop.hbase.master.RegionState;
// 53, 1
import org.apache.hadoop.hbase.master.ServerManager;
// 54, 1
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
// 55, 1
import org.apache.hadoop.hbase.quotas.QuotaUtil;
// 56, 1
import org.apache.hadoop.hbase.security.access.PermissionStorage;
// 57, 1
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants;
// 58, 1
import org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription;
// 59, 1
import org.apache.hadoop.hbase.tool.CanaryTool;
// 60, 1
import org.apache.hadoop.hbase.util.Bytes;
// 61, 1
import org.apache.hadoop.hbase.util.CommonFSUtils;
// 62, 1
import org.apache.hadoop.hbase.util.JvmVersion;
// 63, 1
import org.apache.hadoop.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
\n
\n Home \n Table Details \n ");
// 152, 17
if (master.isActiveMaster() )
{
// 152, 48
jamonWriter.write("\n Procedures & Locks \n HBCK Report \n ");
// 155, 21
if (master.getConfiguration().getBoolean(QuotaUtil.QUOTA_CONF_KEY, false) )
{
// 155, 98
jamonWriter.write("\n Quotas \n ");
}
// 157, 27
jamonWriter.write("\n ");
}
// 158, 23
jamonWriter.write("\n Process Metrics \n Local Logs \n Log Level \n Debug Dump \n Metrics Dump \n Profiler \n ");
// 165, 17
if (HBaseConfiguration.isShowConfInServlet())
{
// 165, 64
jamonWriter.write("\n HBase Configuration \n ");
}
// 167, 23
jamonWriter.write("\n \n
\n
\n
\n\n \n\t");
// 174, 2
if (master.isActiveMaster() )
{
// 174, 33
jamonWriter.write("\n
\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 \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 \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 \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 \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 \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");
}
// 540, 1
private void __jamon_innerUnit__catalogTables(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 541, 1
List sysTables = master.isInitialized() ?
master.listTableDescriptorsByNamespace(NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR) : null;
// 545, 1
if ((sysTables != null && sysTables.size() > 0))
{
// 545, 51
jamonWriter.write("\n\n\n Table Name \n ");
// 549, 5
if ((frags != null) )
{
// 549, 28
jamonWriter.write("\n Frag. \n ");
}
// 551, 11
jamonWriter.write("\n Description \n \n");
// 554, 1
for (TableDescriptor systemTable : sysTables)
{
// 554, 48
jamonWriter.write("\n\n");
// 556, 1
TableName tableName = systemTable.getTableName();
// 557, 5
jamonWriter.write("");
// 557, 50
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName), jamonWriter);
// 557, 65
jamonWriter.write(" \n ");
// 558, 5
if ((frags != null))
{
// 558, 27
jamonWriter.write("\n ");
// 559, 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);
// 560, 37
jamonWriter.write(" \n ");
}
// 561, 11
jamonWriter.write("\n ");
// 562, 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.";
}
// 584, 5
jamonWriter.write("");
// 584, 9
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(description), jamonWriter);
// 584, 26
jamonWriter.write(" \n \n");
}
// 586, 8
jamonWriter.write("\n
\n");
}
// 588, 7
jamonWriter.write("\n");
}
// 705, 1
private void __jamon_innerUnit__deadRegionServers(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 707, 1
if ((deadServers != null && deadServers.size() > 0))
{
// 707, 55
jamonWriter.write("\nDead Region Servers \n\n \n \n ServerName \n Stop time \n \n ");
// 715, 5
DeadServer deadServerUtil = master.getServerManager().getDeadServers();
ServerName [] deadServerNames = deadServers.toArray(new ServerName[deadServers.size()]);
Arrays.sort(deadServerNames);
for (ServerName deadServerName: deadServerNames) {
// 721, 5
jamonWriter.write("\n \t \n ");
// 723, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerName), jamonWriter);
// 723, 33
jamonWriter.write(" \n ");
// 724, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerUtil.getTimeOfDeath(deadServerName)), jamonWriter);
// 724, 64
jamonWriter.write(" \n \n ");
// 726, 5
}
// 729, 5
jamonWriter.write("\n Total: \n servers: ");
// 731, 22
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServers.size()), jamonWriter);
// 731, 46
jamonWriter.write(" \n \n \n
\n");
}
// 735, 7
jamonWriter.write("\n");
}
// 738, 1
private void __jamon_innerUnit__peerConfigs(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 739, 1
List peers = null;
if (master.getReplicationPeerManager() != null) {
peers = master.getReplicationPeerManager().listPeers(null);
}
// 745, 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");
// 759, 1
if ((peers != null && peers.size() > 0))
{
// 759, 43
jamonWriter.write("\n ");
// 760, 5
for (ReplicationPeerDescription peer : peers )
{
// 760, 53
jamonWriter.write("\n ");
// 761, 5
String peerId = peer.getPeerId();
ReplicationPeerConfig peerConfig = peer.getPeerConfig();
// 765, 5
jamonWriter.write("\n ");
// 766, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerId), jamonWriter);
// 766, 25
jamonWriter.write(" \n ");
// 767, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getClusterKey()), jamonWriter);
// 767, 45
jamonWriter.write(" \n ");
// 768, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getReplicationEndpointImpl()), jamonWriter);
// 768, 58
jamonWriter.write(" \n ");
// 769, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peer.isEnabled() ? "ENABLED" : "DISABLED"), jamonWriter);
// 769, 60
jamonWriter.write(" \n ");
// 770, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.isSerial()), jamonWriter);
// 770, 40
jamonWriter.write(" \n ");
// 771, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getBandwidth() == 0? "UNLIMITED" : StringUtils.humanReadableInt(peerConfig.getBandwidth())), jamonWriter);
// 771, 120
jamonWriter.write(" \n ");
// 772, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.replicateAllUserTables()), jamonWriter);
// 772, 54
jamonWriter.write(" \n \n ");
// 774, 12
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getNamespaces() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getNamespaces()).replaceAll(";", "; ")), jamonWriter);
// 774, 151
jamonWriter.write("\n \n \n ");
// 777, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getExcludeNamespaces() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getExcludeNamespaces()).replaceAll(";", "; ")), jamonWriter);
// 777, 166
jamonWriter.write("\n \n \n ");
// 780, 12
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getTableCFsMap() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getTableCFsMap()).replaceAll(";", "; ")), jamonWriter);
// 780, 153
jamonWriter.write("\n \n \n ");
// 783, 12
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(peerConfig.getExcludeTableCFsMap() == null ? "" : ReplicationPeerConfigUtil.convertToString(peerConfig.getExcludeTableCFsMap()).replaceAll(";", "; ")), jamonWriter);
// 783, 167
jamonWriter.write("\n \n \n ");
}
// 786, 12
jamonWriter.write("\n");
}
// 787, 7
jamonWriter.write("\nTotal: ");
// 788, 16
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf((peers != null) ? peers.size() : 0), jamonWriter);
// 788, 56
jamonWriter.write(" \n
\n");
}
// 676, 1
private void __jamon_innerUnit__userSnapshots(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 677, 1
List snapshots = master.isInitialized() ?
master.getSnapshotManager().getCompletedSnapshots() : null;
// 681, 1
if ((snapshots != null && snapshots.size() > 0))
{
// 681, 51
jamonWriter.write("\n\n \n Snapshot Name \n Table \n Creation Time \n \n ");
// 688, 5
for (SnapshotDescription snapshotDesc : snapshots)
{
// 688, 57
jamonWriter.write("\n ");
// 689, 5
TableName snapshotTable = TableName.valueOf(snapshotDesc.getTable());
// 692, 5
jamonWriter.write("\n ");
// 693, 70
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getName()), jamonWriter);
// 693, 98
jamonWriter.write(" \n ");
// 694, 76
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotTable.getNameAsString()), jamonWriter);
// 694, 113
jamonWriter.write(" \n \n ");
// 696, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(snapshotDesc.getCreationTime())), jamonWriter);
// 696, 59
jamonWriter.write(" \n \n ");
}
// 698, 12
jamonWriter.write("\n ");
// 699, 8
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshots.size()), jamonWriter);
// 699, 30
jamonWriter.write(" snapshot(s) in set. [Snapshot Storefile stats ]
\n
\n");
}
// 701, 7
jamonWriter.write("\n");
}
// 591, 1
private void __jamon_innerUnit__userTables(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 592, 1
List tables = new ArrayList();
String errorMessage = getUserTables(master, tables);
// 596, 1
if ((tables.size() == 0 && errorMessage != null))
{
// 596, 52
jamonWriter.write("\n ");
// 597, 5
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(errorMessage), jamonWriter);
// 597, 23
jamonWriter.write("
\n");
}
// 598, 7
jamonWriter.write("\n\n");
// 600, 1
if ((tables != null && tables.size() > 0))
{
// 600, 45
jamonWriter.write("\n\n\n \n Namespace \n Name \n ");
// 606, 9
if ((frags != null) )
{
// 606, 32
jamonWriter.write("\n Frag. \n ");
}
// 608, 15
jamonWriter.write("\n State \n Regions \n Description \n \n \n OPEN \n OPENING \n CLOSED \n CLOSING \n OFFLINE \n SPLIT \n Other \n \n \n\n ");
// 624, 5
for (TableDescriptor desc : tables)
{
// 624, 42
jamonWriter.write("\n ");
// 625, 5
HTableDescriptor htDesc = new HTableDescriptor(desc);
TableName tableName = htDesc.getTableName();
TableState tableState = master.getTableStateManager().getTableState(tableName);
Map> tableRegions =
master.getAssignmentManager().getRegionStates()
.getRegionByStateOfTable(tableName);
int openRegionsCount = tableRegions.get(RegionState.State.OPEN).size();
int openingRegionsCount = tableRegions.get(RegionState.State.OPENING).size();
int closedRegionsCount = tableRegions.get(RegionState.State.CLOSED).size();
int closingRegionsCount = tableRegions.get(RegionState.State.CLOSING).size();
int offlineRegionsCount = tableRegions.get(RegionState.State.OFFLINE).size();
int splitRegionsCount = tableRegions.get(RegionState.State.SPLIT).size();
int otherRegionsCount = 0;
for (List list: tableRegions.values()) {
otherRegionsCount += list.size();
}
// now subtract known states
otherRegionsCount = otherRegionsCount - openRegionsCount
- offlineRegionsCount - splitRegionsCount
- openingRegionsCount - closedRegionsCount
- closingRegionsCount;
String encodedTableName = URLEncoder.encode(tableName.getNameAsString());
// 649, 5
jamonWriter.write("\n ");
// 650, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName.getNamespaceAsString()), jamonWriter);
// 650, 51
jamonWriter.write(" \n ");
// 651, 59
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(URLEncoder.encode(tableName.getQualifierAsString())), jamonWriter);
// 651, 116
jamonWriter.write(" \n ");
// 652, 9
if ((frags != null) )
{
// 652, 32
jamonWriter.write("\n ");
// 653, 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);
// 653, 150
jamonWriter.write(" \n ");
}
// 654, 15
jamonWriter.write("\n ");
// 655, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableState.getState()), jamonWriter);
// 655, 40
jamonWriter.write(" \n ");
// 656, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openRegionsCount), jamonWriter);
// 656, 35
jamonWriter.write(" \n ");
// 657, 9
if ((openingRegionsCount > 0) )
{
// 657, 42
jamonWriter.write(" ");
// 657, 146
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openingRegionsCount), jamonWriter);
// 657, 171
jamonWriter.write(" ");
}
// 657, 177
else
{
// 657, 184
jamonWriter.write("");
// 657, 188
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openingRegionsCount), jamonWriter);
// 657, 213
jamonWriter.write(" ");
}
// 657, 225
jamonWriter.write("\n ");
// 658, 9
if ((closedRegionsCount > 0) )
{
// 658, 41
jamonWriter.write(" ");
// 658, 144
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(closedRegionsCount), jamonWriter);
// 658, 168
jamonWriter.write(" ");
}
// 658, 174
else
{
// 658, 181
jamonWriter.write("");
// 658, 185
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(closedRegionsCount), jamonWriter);
// 658, 209
jamonWriter.write(" ");
}
// 658, 221
jamonWriter.write("\n ");
// 659, 9
if ((closingRegionsCount > 0) )
{
// 659, 42
jamonWriter.write(" ");
// 659, 146
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(closingRegionsCount), jamonWriter);
// 659, 171
jamonWriter.write(" ");
}
// 659, 177
else
{
// 659, 184
jamonWriter.write("");
// 659, 188
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(closingRegionsCount), jamonWriter);
// 659, 213
jamonWriter.write(" ");
}
// 659, 225
jamonWriter.write("\n ");
// 660, 9
if ((offlineRegionsCount > 0) )
{
// 660, 42
jamonWriter.write(" ");
// 660, 146
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(offlineRegionsCount), jamonWriter);
// 660, 171
jamonWriter.write(" ");
}
// 660, 177
else
{
// 660, 184
jamonWriter.write("");
// 660, 188
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(offlineRegionsCount), jamonWriter);
// 660, 213
jamonWriter.write(" ");
}
// 660, 225
jamonWriter.write("\n ");
// 661, 9
if ((splitRegionsCount > 0) )
{
// 661, 40
jamonWriter.write(" ");
// 661, 142
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(splitRegionsCount), jamonWriter);
// 661, 165
jamonWriter.write(" ");
}
// 661, 171
else
{
// 661, 178
jamonWriter.write("");
// 661, 182
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(splitRegionsCount), jamonWriter);
// 661, 205
jamonWriter.write(" ");
}
// 661, 217
jamonWriter.write("\n ");
// 662, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(otherRegionsCount), jamonWriter);
// 662, 36
jamonWriter.write(" \n ");
// 663, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(htDesc.toStringCustomizedValues()), jamonWriter);
// 663, 52
jamonWriter.write(" \n \n ");
}
// 665, 12
jamonWriter.write("\n ");
// 666, 8
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tables.size()), jamonWriter);
// 666, 27
jamonWriter.write(" table(s) in set. [Details ]. Click count below to\n see list of regions currently in 'state' designated by the column title. For 'Other' Region state,\n browse to hbase:meta and adjust filter on 'Meta Entries' to\n query on states other than those listed here. Queries may take a while if the hbase:meta table\n is large.
\n \n
\n");
}
// 673, 7
jamonWriter.write("\n");
}
}