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/stack/checkouts/hbase.git/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.RegionInfo;
// 35, 1
import org.apache.hadoop.hbase.client.TableDescriptor;
// 36, 1
import org.apache.hadoop.hbase.HBaseConfiguration;
// 37, 1
import org.apache.hadoop.hbase.HConstants;
// 38, 1
import org.apache.hadoop.hbase.HTableDescriptor;
// 39, 1
import org.apache.hadoop.hbase.NamespaceDescriptor;
// 40, 1
import org.apache.hadoop.hbase.ServerName;
// 41, 1
import org.apache.hadoop.hbase.TableName;
// 42, 1
import org.apache.hadoop.hbase.client.Admin;
// 43, 1
import org.apache.hadoop.hbase.client.MasterSwitchType;
// 44, 1
import org.apache.hadoop.hbase.master.assignment.AssignmentManager;
// 45, 1
import org.apache.hadoop.hbase.master.DeadServer;
// 46, 1
import org.apache.hadoop.hbase.master.HMaster;
// 47, 1
import org.apache.hadoop.hbase.master.RegionState;
// 48, 1
import org.apache.hadoop.hbase.master.ServerManager;
// 49, 1
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
// 50, 1
import org.apache.hadoop.hbase.quotas.QuotaUtil;
// 51, 1
import org.apache.hadoop.hbase.security.access.AccessControlLists;
// 52, 1
import org.apache.hadoop.hbase.security.visibility.VisibilityConstants;
// 53, 1
import org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription;
// 54, 1
import org.apache.hadoop.hbase.tool.Canary;
// 55, 1
import org.apache.hadoop.hbase.util.Bytes;
// 56, 1
import org.apache.hadoop.hbase.util.FSUtils;
// 57, 1
import org.apache.hadoop.hbase.util.JvmVersion;
// 58, 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;
// 70, 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();
}
// 97, 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
{
// 61, 1
if (format.equals("json") )
{
// 61, 30
jamonWriter.write("\n ");
// 62, 3
{
org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl __jamon__var_0 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager());
__jamon__var_0.setFilter(filter);
__jamon__var_0.setFormat("json" );
__jamon__var_0.renderNoFlush(jamonWriter);
}
// 62, 68
jamonWriter.write("\n ");
// 63, 3
return;
}
// 64, 7
jamonWriter.write("\n");
// 65, 1
ServerManager serverManager = master.getServerManager();
AssignmentManager assignmentManager = master.getAssignmentManager();
// 117, 1
jamonWriter.write("\n\n\n \n \n ");
// 122, 12
if (master.isActiveMaster() )
{
// 122, 43
jamonWriter.write("Master: ");
}
// 122, 51
else
{
// 122, 58
jamonWriter.write("Backup Master: ");
}
// 122, 79
jamonWriter.write("\n ");
// 123, 5
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerName().getHostname()), jamonWriter);
// 123, 47
jamonWriter.write(" \n \n \n \n \n \n \n\n \n\n \n\n \n\t");
// 164, 2
if (master.isActiveMaster() )
{
// 164, 33
jamonWriter.write("\n \n \n Master ");
// 167, 35
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerName().getHostname()), jamonWriter);
// 167, 77
jamonWriter.write("
\n \n \n\n \n \n ");
// 173, 9
if (JvmVersion.isBadJvmVersion() )
{
// 173, 45
jamonWriter.write("\n \n Your current JVM version ");
// 175, 36
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(System.getProperty("java.version")), jamonWriter);
// 175, 76
jamonWriter.write(" is known to be\n unstable with HBase. Please see the\n HBase Reference Guide\n for details.\n \n ");
}
// 180, 15
jamonWriter.write("\n ");
// 181, 9
if (master.isInitialized() && !catalogJanitorEnabled )
{
// 181, 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 ");
}
// 186, 15
jamonWriter.write("\n ");
// 187, 9
if (master.isInMaintenanceMode() )
{
// 187, 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 ");
}
// 192, 15
jamonWriter.write("\n ");
// 193, 9
if (!master.isBalancerOn() )
{
// 193, 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 ");
}
// 199, 15
jamonWriter.write("\n ");
// 200, 9
if (!master.isSplitOrMergeEnabled(MasterSwitchType.SPLIT) )
{
// 200, 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 ");
}
// 206, 15
jamonWriter.write("\n ");
// 207, 9
if (!master.isSplitOrMergeEnabled(MasterSwitchType.MERGE) )
{
// 207, 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 ");
}
// 213, 15
jamonWriter.write("\n ");
// 214, 9
if (master.getMasterCoprocessorHost().findCoprocessor("RSGroupAdminEndpoint") != null )
{
// 214, 98
jamonWriter.write("\n \n RSGroup
\n ");
// 217, 13
{
org.apache.hadoop.hbase.tmpl.master.RSGroupListTmpl __jamon__var_1 = new org.apache.hadoop.hbase.tmpl.master.RSGroupListTmpl(this.getTemplateManager());
__jamon__var_1.renderNoFlush(jamonWriter, master, serverManager);
}
// 217, 79
jamonWriter.write("\n \n ");
}
// 219, 15
jamonWriter.write("\n \n Region Servers
\n ");
// 222, 13
{
org.apache.hadoop.hbase.tmpl.master.RegionServerListTmpl __jamon__var_2 = new org.apache.hadoop.hbase.tmpl.master.RegionServerListTmpl(this.getTemplateManager());
__jamon__var_2.setServers(servers );
__jamon__var_2.renderNoFlush(jamonWriter, master);
}
// 222, 74
jamonWriter.write("\n\n ");
// 224, 13
if ((deadServers != null) )
{
// 224, 42
jamonWriter.write("\n ");
// 225, 17
{
// 225, 17
__jamon_innerUnit__deadRegionServers(jamonWriter);
}
// 225, 40
jamonWriter.write("\n ");
}
// 226, 19
jamonWriter.write("\n \n \n ");
// 229, 13
{
org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl __jamon__var_3 = new org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl(this.getTemplateManager());
__jamon__var_3.renderNoFlush(jamonWriter, master );
}
// 229, 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 ");
// 247, 25
if ((metaLocation != null) )
{
// 247, 55
jamonWriter.write("\n ");
// 248, 29
{
// 248, 29
__jamon_innerUnit__userTables(jamonWriter);
}
// 248, 45
jamonWriter.write("\n ");
}
// 249, 31
jamonWriter.write("\n \n \n ");
// 252, 25
if ((metaLocation != null) )
{
// 252, 55
jamonWriter.write("\n ");
// 253, 29
{
// 253, 29
__jamon_innerUnit__catalogTables(jamonWriter);
}
// 253, 48
jamonWriter.write("\n ");
}
// 254, 31
jamonWriter.write("\n \n \n ");
// 257, 25
{
// 257, 25
__jamon_innerUnit__userSnapshots(jamonWriter);
}
// 257, 44
jamonWriter.write("\n \n \n \n \n ");
// 262, 9
if (master.getAssignmentManager() != null )
{
// 262, 54
jamonWriter.write("\n ");
// 263, 9
{
org.apache.hadoop.hbase.tmpl.master.AssignmentManagerStatusTmpl __jamon__var_4 = new org.apache.hadoop.hbase.tmpl.master.AssignmentManagerStatusTmpl(this.getTemplateManager());
__jamon__var_4.renderNoFlush(jamonWriter, master.getAssignmentManager());
}
// 263, 90
jamonWriter.write("\n ");
}
// 264, 15
jamonWriter.write("\n\t");
}
// 265, 2
else
{
// 265, 9
jamonWriter.write("\n \n ");
// 267, 13
{
org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl __jamon__var_5 = new org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl(this.getTemplateManager());
__jamon__var_5.renderNoFlush(jamonWriter, master );
}
// 267, 58
jamonWriter.write("\n \n\t");
}
// 269, 8
jamonWriter.write("\n\n\n \n ");
// 273, 13
{
org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl __jamon__var_6 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager());
__jamon__var_6.setFilter(filter );
__jamon__var_6.renderNoFlush(jamonWriter);
}
// 273, 61
jamonWriter.write("\n \n\n \n Software Attributes
\n \n \n Attribute Name \n Value \n Description \n \n \n HBase Version \n ");
// 286, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getVersion()), jamonWriter);
// 286, 84
jamonWriter.write(", revision=");
// 286, 95
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getRevision()), jamonWriter);
// 286, 155
jamonWriter.write(" HBase version and revision \n \n \n HBase Compiled \n ");
// 290, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getDate()), jamonWriter);
// 290, 81
jamonWriter.write(", ");
// 290, 83
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getUser()), jamonWriter);
// 290, 139
jamonWriter.write(" \n When HBase version was compiled and by whom \n \n \n HBase Source Checksum \n ");
// 295, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getSrcChecksum()), jamonWriter);
// 295, 88
jamonWriter.write(" \n HBase source MD5 checksum \n \n \n Hadoop Version \n ");
// 300, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getVersion()), jamonWriter);
// 300, 78
jamonWriter.write(", revision=");
// 300, 89
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getRevision()), jamonWriter);
// 300, 143
jamonWriter.write(" \n Hadoop version and revision \n \n \n Hadoop Compiled \n ");
// 305, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getDate()), jamonWriter);
// 305, 75
jamonWriter.write(", ");
// 305, 77
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getUser()), jamonWriter);
// 305, 127
jamonWriter.write(" \n When Hadoop version was compiled and by whom \n \n \n Hadoop Source Checksum \n ");
// 310, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getSrcChecksum()), jamonWriter);
// 310, 82
jamonWriter.write(" \n Hadoop source MD5 checksum \n \n \n ZooKeeper Client Version \n ");
// 315, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getVersion()), jamonWriter);
// 315, 72
jamonWriter.write(", revision=");
// 315, 83
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getRevision()), jamonWriter);
// 315, 131
jamonWriter.write(" \n ZooKeeper client version and revision \n \n \n ZooKeeper Client Compiled \n ");
// 320, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.zookeeper.Version.getBuildDate()), jamonWriter);
// 320, 74
jamonWriter.write(" \n When ZooKeeper client version was compiled \n \n \n ZooKeeper Quorum \n ");
// 326, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter);
// 326, 48
jamonWriter.write(" \n Addresses of all registered ZK servers. For more, see zk dump. \n \n \n ZooKeeper Base Path \n ");
// 331, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getZooKeeper().getZNodePaths().baseZNode), jamonWriter);
// 331, 79
jamonWriter.write(" \n Root node of this cluster in ZK. \n \n \n HBase Root Directory \n ");
// 336, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(FSUtils.getRootDir(master.getConfiguration()).toString()), jamonWriter);
// 336, 87
jamonWriter.write(" \n Location of HBase home directory \n \n \n HMaster Start Time \n ");
// 341, 25
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterStartTime())), jamonWriter);
// 341, 68
jamonWriter.write(" \n Date stamp of when this HMaster was started \n \n ");
// 344, 17
if (master.isActiveMaster() )
{
// 344, 48
jamonWriter.write("\n\t \n\t HMaster Active Time \n\t ");
// 347, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterActiveTime())), jamonWriter);
// 347, 70
jamonWriter.write(" \n\t Date stamp of when this HMaster became active \n\t \n\t \n\t HBase Cluster ID \n\t ");
// 352, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getClusterId() != null ? master.getClusterId() : "Not set"), jamonWriter);
// 352, 97
jamonWriter.write(" \n\t Unique identifier generated for each HBase cluster \n\t \n\t \n\t Load average \n\t ");
// 357, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerManager() == null ? "0.00" :
StringUtils.limitDecimalTo2(master.getServerManager().getAverageLoad())), jamonWriter);
// 358, 98
jamonWriter.write(" \n\t Average number of regions per regionserver. Naive computation. \n\t \n\t ");
// 361, 18
if (frags != null )
{
// 361, 39
jamonWriter.write("\n\t \n\t Fragmentation \n\t ");
// 364, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get("-TOTAL-") != null ? frags.get("-TOTAL-").intValue() + "%" : "n/a"), jamonWriter);
// 364, 108
jamonWriter.write(" \n\t Overall fragmentation of all tables, including hbase:meta \n\t \n\t ");
}
// 367, 24
jamonWriter.write("\n\t \n\t Coprocessors \n\t ");
// 370, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getMasterCoprocessorHost() == null ? "[]" :
java.util.Arrays.toString(master.getMasterCoprocessors())), jamonWriter);
// 371, 84
jamonWriter.write(" \n\t Coprocessors currently loaded by the master \n\t \n\t \n\t LoadBalancer \n\t ");
// 376, 26
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getLoadBalancerClassName()), jamonWriter);
// 376, 65
jamonWriter.write(" \n\t LoadBalancer to be used in the Master \n\t \n ");
}
// 379, 23
jamonWriter.write("\n
\n \n \n \n\n \n \n \n \n\n\n");
}
// 391, 1
private void __jamon_innerUnit__catalogTables(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 392, 1
List sysTables = master.isInitialized() ?
master.listTableDescriptorsByNamespace(NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR) : null;
// 396, 1
if ((sysTables != null && sysTables.size() > 0))
{
// 396, 51
jamonWriter.write("\n\n\n Table Name \n ");
// 400, 5
if ((frags != null) )
{
// 400, 28
jamonWriter.write("\n Frag. \n ");
}
// 402, 11
jamonWriter.write("\n Description \n \n");
// 405, 1
for (TableDescriptor systemTable : sysTables)
{
// 405, 48
jamonWriter.write("\n\n");
// 407, 1
TableName tableName = systemTable.getTableName();
// 408, 5
jamonWriter.write("");
// 408, 50
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName), jamonWriter);
// 408, 65
jamonWriter.write(" \n ");
// 409, 5
if ((frags != null))
{
// 409, 27
jamonWriter.write("\n ");
// 410, 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);
// 411, 37
jamonWriter.write(" \n ");
}
// 412, 11
jamonWriter.write("\n ");
// 413, 5
String description = null;
if (tableName.equals(TableName.META_TABLE_NAME)){
description = "The hbase:meta table holds references to all User Table regions.";
} else if (tableName.equals(Canary.DEFAULT_WRITE_TABLE_NAME)){
description = "The hbase:canary table is used to sniff the write availbility of"
+ " each regionserver.";
} else if (tableName.equals(AccessControlLists.ACL_TABLE_NAME)){
description = "The hbase:acl table holds information about acl.";
} else if (tableName.equals(VisibilityConstants.LABELS_TABLE_NAME)){
description = "The hbase:labels table holds information about visibility labels.";
} else if (tableName.equals(TableName.NAMESPACE_TABLE_NAME)){
description = "The hbase:namespace table holds information about namespaces.";
} else if (tableName.equals(QuotaUtil.QUOTA_TABLE_NAME)){
description = "The hbase:quota table holds quota information about number" +
" or size of requests in a given time frame.";
} else if (tableName.equals(TableName.valueOf("hbase:rsgroup"))){
description = "The hbase:rsgroup table holds information about regionserver groups.";
} else if (tableName.equals(TableName.valueOf("hbase:replication"))) {
description = "The hbase:replication table tracks cross cluster replication through " +
"WAL file offsets.";
}
// 435, 5
jamonWriter.write("");
// 435, 9
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(description), jamonWriter);
// 435, 26
jamonWriter.write(" \n \n");
}
// 437, 8
jamonWriter.write("\n
\n");
}
// 439, 7
jamonWriter.write("\n");
}
// 535, 1
private void __jamon_innerUnit__deadRegionServers(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 537, 1
if ((deadServers != null && deadServers.size() > 0))
{
// 537, 55
jamonWriter.write("\nDead Region Servers
\n\n \n \n ServerName \n Stop time \n \n ");
// 545, 5
DeadServer deadServerUtil = master.getServerManager().getDeadServers();
ServerName [] deadServerNames = deadServers.toArray(new ServerName[deadServers.size()]);
Arrays.sort(deadServerNames);
for (ServerName deadServerName: deadServerNames) {
// 551, 5
jamonWriter.write("\n \t \n ");
// 553, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerName), jamonWriter);
// 553, 33
jamonWriter.write(" \n ");
// 554, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerUtil.getTimeOfDeath(deadServerName)), jamonWriter);
// 554, 64
jamonWriter.write(" \n \n ");
// 556, 5
}
// 559, 5
jamonWriter.write("\n Total: \n servers: ");
// 561, 22
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServers.size()), jamonWriter);
// 561, 46
jamonWriter.write(" \n \n \n
\n");
}
// 565, 7
jamonWriter.write("\n");
}
// 506, 1
private void __jamon_innerUnit__userSnapshots(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 507, 1
List snapshots = master.isInitialized() ?
master.getSnapshotManager().getCompletedSnapshots() : null;
// 511, 1
if ((snapshots != null && snapshots.size() > 0))
{
// 511, 51
jamonWriter.write("\n\n \n Snapshot Name \n Table \n Creation Time \n \n ");
// 518, 5
for (SnapshotDescription snapshotDesc : snapshots)
{
// 518, 57
jamonWriter.write("\n ");
// 519, 5
TableName snapshotTable = TableName.valueOf(snapshotDesc.getTable());
// 522, 5
jamonWriter.write("\n ");
// 523, 70
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getName()), jamonWriter);
// 523, 98
jamonWriter.write(" \n ");
// 524, 76
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotTable.getNameAsString()), jamonWriter);
// 524, 113
jamonWriter.write("\n \n ");
// 526, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(snapshotDesc.getCreationTime())), jamonWriter);
// 526, 59
jamonWriter.write(" \n \n ");
}
// 528, 12
jamonWriter.write("\n ");
// 529, 8
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshots.size()), jamonWriter);
// 529, 30
jamonWriter.write(" snapshot(s) in set. [Snapshot Storefile stats]
\n
\n");
}
// 531, 7
jamonWriter.write("\n");
}
// 442, 1
private void __jamon_innerUnit__userTables(final java.io.Writer jamonWriter)
throws java.io.IOException
{
// 443, 1
List tables = new ArrayList();
String errorMessage = getUserTables(master, tables);
// 447, 1
if ((tables.size() == 0 && errorMessage != null))
{
// 447, 52
jamonWriter.write("\n ");
// 448, 5
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(errorMessage), jamonWriter);
// 448, 23
jamonWriter.write("
\n");
}
// 449, 7
jamonWriter.write("\n\n");
// 451, 1
if ((tables != null && tables.size() > 0))
{
// 451, 45
jamonWriter.write("\n\n \n Namespace \n Table Name \n ");
// 456, 9
if ((frags != null) )
{
// 456, 32
jamonWriter.write("\n Frag. \n ");
}
// 458, 15
jamonWriter.write("\n Online Regions \n Offline Regions \n Failed Regions \n Split Regions \n Other Regions \n Description \n \n ");
// 466, 5
for (TableDescriptor desc : tables)
{
// 466, 42
jamonWriter.write("\n ");
// 467, 5
HTableDescriptor htDesc = new HTableDescriptor(desc);
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;
// 487, 5
jamonWriter.write("\n ");
// 488, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName.getNamespaceAsString()), jamonWriter);
// 488, 51
jamonWriter.write(" \n ");
// 489, 70
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName.getQualifierAsString()), jamonWriter);
// 489, 108
jamonWriter.write(" \n ");
// 490, 9
if ((frags != null) )
{
// 490, 32
jamonWriter.write("\n ");
// 491, 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);
// 491, 150
jamonWriter.write(" \n ");
}
// 492, 15
jamonWriter.write("\n ");
// 493, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(openRegionsCount), jamonWriter);
// 493, 35
jamonWriter.write(" \n ");
// 494, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(offlineRegionsCount), jamonWriter);
// 494, 38
jamonWriter.write(" \n ");
// 495, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(failedRegionsCount), jamonWriter);
// 495, 37
jamonWriter.write(" \n ");
// 496, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(splitRegionsCount), jamonWriter);
// 496, 36
jamonWriter.write(" \n ");
// 497, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(otherRegionsCount), jamonWriter);
// 497, 36
jamonWriter.write(" \n ");
// 498, 13
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(htDesc.toStringCustomizedValues()), jamonWriter);
// 498, 52
jamonWriter.write(" \n \n ");
}
// 500, 12
jamonWriter.write("\n ");
// 501, 8
org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tables.size()), jamonWriter);
// 501, 27
jamonWriter.write(" table(s) in set. [Details]
\n
\n");
}
// 503, 7
jamonWriter.write("\n");
}
}