View Javadoc

1   // Autogenerated Jamon implementation
2   // /Users/misty/git/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
3   
4   package org.apache.hadoop.hbase.tmpl.master;
5   
6   // 33, 1
7   import java.util.*;
8   // 34, 1
9   import org.apache.hadoop.util.StringUtils;
10  // 35, 1
11  import org.apache.hadoop.hbase.util.Bytes;
12  // 36, 1
13  import org.apache.hadoop.hbase.util.JvmVersion;
14  // 37, 1
15  import org.apache.hadoop.hbase.util.FSUtils;
16  // 38, 1
17  import org.apache.hadoop.hbase.master.HMaster;
18  // 39, 1
19  import org.apache.hadoop.hbase.master.AssignmentManager;
20  // 40, 1
21  import org.apache.hadoop.hbase.master.ServerManager;
22  // 41, 1
23  import org.apache.hadoop.hbase.HConstants;
24  // 42, 1
25  import org.apache.hadoop.hbase.NamespaceDescriptor;
26  // 43, 1
27  import org.apache.hadoop.hbase.ServerLoad;
28  // 44, 1
29  import org.apache.hadoop.hbase.ServerName;
30  // 45, 1
31  import org.apache.hadoop.hbase.client.HBaseAdmin;
32  // 46, 1
33  import org.apache.hadoop.hbase.client.HConnectionManager;
34  // 47, 1
35  import org.apache.hadoop.hbase.HTableDescriptor;
36  // 48, 1
37  import org.apache.hadoop.hbase.HBaseConfiguration;
38  // 49, 1
39  import org.apache.hadoop.hbase.TableName;
40  // 50, 1
41  import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
42  // 51, 1
43  import org.apache.hadoop.hbase.master.DeadServer;
44  // 52, 1
45  import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
46  // 53, 1
47  import org.apache.hadoop.hbase.security.visibility.VisibilityConstants;
48  // 54, 1
49  import org.apache.hadoop.hbase.security.access.AccessControlLists;
50  
51  public class MasterStatusTmplImpl
52    extends org.jamon.AbstractTemplateImpl
53    implements org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl.Intf
54  
55  {
56    private final HMaster master;
57    private final HBaseAdmin admin;
58    private final Set<ServerName> deadServers;
59    private final boolean catalogJanitorEnabled;
60    private final AssignmentManager assignmentManager;
61    private final ServerManager serverManager;
62    private final String filter;
63    private final List<ServerName> servers;
64    private final String format;
65    private final ServerName metaLocation;
66    private final Map<String,Integer> frags;
67    // 66, 1
68    
69    public String formatZKString() {
70      StringBuilder quorums = new StringBuilder();
71      String zkQuorum = master.getZooKeeper().getQuorum();
72  
73      if (null == zkQuorum) {
74        return quorums.toString();
75      }
76  
77      String[] zks = zkQuorum.split(",");
78  
79      if (zks.length == 0) {
80        return quorums.toString();
81      }
82  
83      for(int i = 0; i < zks.length; ++i) {
84        quorums.append(zks[i].trim()).append(",");
85  
86        if ((i+1) % 4 == 0 && i != (zks.length - 1)) {
87          quorums.append("<br/>");
88        }
89      }
90  
91      quorums.setLength(quorums.length() - 1);
92      return quorums.toString();
93    }
94  
95    protected static org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl.ImplData __jamon_setOptionalArguments(org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl.ImplData p_implData)
96    {
97      if(! p_implData.getDeadServers__IsNotDefault())
98      {
99        p_implData.setDeadServers(null);
100     }
101     if(! p_implData.getCatalogJanitorEnabled__IsNotDefault())
102     {
103       p_implData.setCatalogJanitorEnabled(true);
104     }
105     if(! p_implData.getAssignmentManager__IsNotDefault())
106     {
107       p_implData.setAssignmentManager(null);
108     }
109     if(! p_implData.getServerManager__IsNotDefault())
110     {
111       p_implData.setServerManager(null);
112     }
113     if(! p_implData.getFilter__IsNotDefault())
114     {
115       p_implData.setFilter("general");
116     }
117     if(! p_implData.getServers__IsNotDefault())
118     {
119       p_implData.setServers(null);
120     }
121     if(! p_implData.getFormat__IsNotDefault())
122     {
123       p_implData.setFormat("html");
124     }
125     if(! p_implData.getMetaLocation__IsNotDefault())
126     {
127       p_implData.setMetaLocation(null);
128     }
129     if(! p_implData.getFrags__IsNotDefault())
130     {
131       p_implData.setFrags(null);
132     }
133     return p_implData;
134   }
135   public MasterStatusTmplImpl(org.jamon.TemplateManager p_templateManager, org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl.ImplData p_implData)
136   {
137     super(p_templateManager, __jamon_setOptionalArguments(p_implData));
138     master = p_implData.getMaster();
139     admin = p_implData.getAdmin();
140     deadServers = p_implData.getDeadServers();
141     catalogJanitorEnabled = p_implData.getCatalogJanitorEnabled();
142     assignmentManager = p_implData.getAssignmentManager();
143     serverManager = p_implData.getServerManager();
144     filter = p_implData.getFilter();
145     servers = p_implData.getServers();
146     format = p_implData.getFormat();
147     metaLocation = p_implData.getMetaLocation();
148     frags = p_implData.getFrags();
149   }
150   
151   public void renderNoFlush(@SuppressWarnings({"unused","hiding"}) final java.io.Writer jamonWriter)
152     throws java.io.IOException
153   {
154     // 57, 1
155     if (format.equals("json") )
156     {
157       // 57, 30
158       jamonWriter.write("\n  ");
159       // 58, 3
160       {
161         org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl __jamon__var_6 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager());
162         __jamon__var_6.setFilter(filter);
163         __jamon__var_6.setFormat("json" );
164         __jamon__var_6.renderNoFlush(jamonWriter);
165       }
166       // 58, 68
167       jamonWriter.write("\n  ");
168       // 59, 3
169       return; 
170     }
171     // 60, 7
172     jamonWriter.write("\n");
173     // 61, 1
174     
175 ServerManager serverManager = master.getServerManager();
176 AssignmentManager assignmentManager = master.getAssignmentManager();
177 
178     // 94, 1
179     jamonWriter.write("<!--[if IE]>\n<!DOCTYPE html>\n<![endif]-->\n<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\">\n    <title>Master: ");
180     // 101, 20
181     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerName().getHostname()), jamonWriter);
182     // 101, 62
183     jamonWriter.write("</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <meta name=\"description\" content=\"\">\n    <link href=\"/static/css/bootstrap.min.css\" rel=\"stylesheet\">\n    <link href=\"/static/css/bootstrap-theme.min.css\" rel=\"stylesheet\">\n    <link href=\"/static/css/hbase.css\" rel=\"stylesheet\">\n  </head>\n\n  <body>\n\n    <div class=\"navbar  navbar-fixed-top navbar-default\">\n        <div class=\"container\">\n            <div class=\"navbar-header\">\n                <button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\".navbar-collapse\">\n                    <span class=\"icon-bar\"></span>\n                    <span class=\"icon-bar\"></span>\n                    <span class=\"icon-bar\"></span>\n                </button>\n                <a class=\"navbar-brand\" href=\"/master-status\"><img src=\"/static/hbase_logo_small.png\" alt=\"HBase Logo\"/></a>\n            </div>\n            <div class=\"collapse navbar-collapse\">\n                <ul class=\"nav navbar-nav\">\n                <li class=\"active\"><a href=\"/\">Home</a></li>\n                <li><a href=\"/tablesDetailed.jsp\">Table Details</a></li>\n                <li><a href=\"/logs/\">Local Logs</a></li>\n                <li><a href=\"/logLevel\">Log Level</a></li>\n                <li><a href=\"/dump\">Debug Dump</a></li>\n                <li><a href=\"/jmx\">Metrics Dump</a></li>\n                ");
184     // 129, 17
185     if (HBaseConfiguration.isShowConfInServlet())
186     {
187       // 129, 64
188       jamonWriter.write("\n                <li><a href=\"/conf\">HBase Configuration</a></li>\n                ");
189     }
190     // 131, 23
191     jamonWriter.write("\n               </ul>\n            </div><!--/.nav-collapse -->\n        </div>\n    </div>\n\n    <div class=\"container\">\n\t");
192     // 138, 2
193     if (master.isActiveMaster() )
194     {
195       // 138, 33
196       jamonWriter.write("\n        <div class=\"row inner_header\">\n            <div class=\"page-header\">\n                <h1>Master <small>");
197       // 141, 35
198       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerName().getHostname()), jamonWriter);
199       // 141, 77
200       jamonWriter.write(" </small></h1>\n            </div>\n        </div>\n\n        <div class=\"row\">\n        <!-- Various warnings that cluster admins should be aware of -->\n        ");
201       // 147, 9
202       if (JvmVersion.isBadJvmVersion() )
203       {
204         // 147, 45
205         jamonWriter.write("\n          <div class=\"alert alert-error\">\n          Your current JVM version ");
206         // 149, 36
207         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(System.getProperty("java.version")), jamonWriter);
208         // 149, 76
209         jamonWriter.write(" is known to be\n          unstable with HBase. Please see the\n          <a href=\"http://wiki.apache.org/hadoop/Hbase/Troubleshooting#A18\">HBase wiki</a>\n          for details.\n          </div>\n        ");
210       }
211       // 154, 15
212       jamonWriter.write("\n        ");
213       // 155, 9
214       if (master.isInitialized() && !catalogJanitorEnabled )
215       {
216         // 155, 65
217         jamonWriter.write("\n          <div class=\"alert alert-error\">\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          </div>\n        ");
218       }
219       // 160, 15
220       jamonWriter.write("\n\n        <section>\n            <h2>Region Servers</h2>\n            ");
221       // 164, 13
222       {
223         org.apache.hadoop.hbase.tmpl.master.RegionServerListTmpl __jamon__var_7 = new org.apache.hadoop.hbase.tmpl.master.RegionServerListTmpl(this.getTemplateManager());
224         __jamon__var_7.setServers(servers );
225         __jamon__var_7.renderNoFlush(jamonWriter, master);
226       }
227       // 164, 74
228       jamonWriter.write("\n\n            ");
229       // 166, 13
230       if ((deadServers != null) )
231       {
232         // 166, 42
233         jamonWriter.write("\n                ");
234         // 167, 17
235         {
236           // 167, 17
237           __jamon_innerUnit__deadRegionServers(jamonWriter);
238         }
239         // 167, 40
240         jamonWriter.write("\n            ");
241       }
242       // 168, 19
243       jamonWriter.write("\n        </section>\n        <section>\n            ");
244       // 171, 13
245       {
246         org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl __jamon__var_8 = new org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl(this.getTemplateManager());
247         __jamon__var_8.renderNoFlush(jamonWriter, master );
248       }
249       // 171, 58
250       jamonWriter.write("\n        </section>\n        <section>\n            <h2>Tables</h2>\n            <div class=\"tabbable\">\n                <ul class=\"nav nav-pills\">\n                    <li class=\"active\">\n                        <a href=\"#tab_userTables\" data-toggle=\"tab\">User Tables</a>\n                    </li>\n                    <li class=\"\">\n                        <a href=\"#tab_catalogTables\" data-toggle=\"tab\">System Tables</a>\n                    </li>\n                    <li class=\"\">\n                        <a href=\"#tab_userSnapshots\" data-toggle=\"tab\">Snapshots</a>\n                    </li>\n                </ul>\n                <div class=\"tab-content\" style=\"padding-bottom: 9px; border-bottom: 1px solid #ddd;\">\n                    <div class=\"tab-pane active\" id=\"tab_userTables\">\n                        ");
251       // 189, 25
252       if ((metaLocation != null) )
253       {
254         // 189, 55
255         jamonWriter.write("\n                            ");
256         // 190, 29
257         {
258           // 190, 29
259           __jamon_innerUnit__userTables(jamonWriter);
260         }
261         // 190, 45
262         jamonWriter.write("\n                        ");
263       }
264       // 191, 31
265       jamonWriter.write("\n                    </div>\n                    <div class=\"tab-pane\" id=\"tab_catalogTables\">\n                        ");
266       // 194, 25
267       if ((metaLocation != null) )
268       {
269         // 194, 55
270         jamonWriter.write("\n                            ");
271         // 195, 29
272         {
273           // 195, 29
274           __jamon_innerUnit__catalogTables(jamonWriter);
275         }
276         // 195, 48
277         jamonWriter.write("\n                        ");
278       }
279       // 196, 31
280       jamonWriter.write("\n                    </div>\n                    <div class=\"tab-pane\" id=\"tab_userSnapshots\">\n                        ");
281       // 199, 25
282       {
283         // 199, 25
284         __jamon_innerUnit__userSnapshots(jamonWriter);
285       }
286       // 199, 44
287       jamonWriter.write("\n                    </div>\n                </div>\n            </div>\n        </section>\n        ");
288       // 204, 9
289       if (master.getAssignmentManager() != null )
290       {
291         // 204, 54
292         jamonWriter.write("\n        ");
293         // 205, 9
294         {
295           org.apache.hadoop.hbase.tmpl.master.AssignmentManagerStatusTmpl __jamon__var_9 = new org.apache.hadoop.hbase.tmpl.master.AssignmentManagerStatusTmpl(this.getTemplateManager());
296           __jamon__var_9.renderNoFlush(jamonWriter, master.getAssignmentManager());
297         }
298         // 205, 90
299         jamonWriter.write("\n        ");
300       }
301       // 206, 15
302       jamonWriter.write("\n\t");
303     }
304     // 207, 2
305     else
306     {
307       // 207, 9
308       jamonWriter.write("\n        <section>\n            ");
309       // 209, 13
310       {
311         org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl __jamon__var_10 = new org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl(this.getTemplateManager());
312         __jamon__var_10.renderNoFlush(jamonWriter, master );
313       }
314       // 209, 58
315       jamonWriter.write("\n        </section>\n\t");
316     }
317     // 211, 8
318     jamonWriter.write("    \n\n\n        <section>\n            ");
319     // 215, 13
320     {
321       org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl __jamon__var_11 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager());
322       __jamon__var_11.setFilter(filter );
323       __jamon__var_11.renderNoFlush(jamonWriter);
324     }
325     // 215, 61
326     jamonWriter.write("\n        </section>\n\n        <section>\n            <h2>Software Attributes</h2>\n            <table id=\"attributes_table\" class=\"table table-striped\">\n                <tr>\n                    <th>Attribute Name</th>\n                    <th>Value</th>\n                    <th>Description</th>\n                </tr>\n                <tr>\n                    <td>HBase Version</td>\n                    <td>");
327     // 228, 25
328     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getVersion()), jamonWriter);
329     // 228, 84
330     jamonWriter.write(", r");
331     // 228, 87
332     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getRevision()), jamonWriter);
333     // 228, 147
334     jamonWriter.write("</td><td>HBase version and revision</td>\n                </tr>\n                <tr>\n                    <td>HBase Compiled</td>\n                    <td>");
335     // 232, 25
336     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getDate()), jamonWriter);
337     // 232, 81
338     jamonWriter.write(", ");
339     // 232, 83
340     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.hbase.util.VersionInfo.getUser()), jamonWriter);
341     // 232, 139
342     jamonWriter.write("</td>\n                    <td>When HBase version was compiled and by whom</td>\n                </tr>\n                <tr>\n                    <td>HBase Source Checksum</td>\n                    <td>");
343     // 237, 25
344     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getSrcChecksum()), jamonWriter);
345     // 237, 82
346     jamonWriter.write("</td>\n                    <td>HBase source MD5 checksum</td>\n                </tr>\n                <tr>\n                    <td>Hadoop Version</td>\n                    <td>");
347     // 242, 25
348     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getVersion()), jamonWriter);
349     // 242, 78
350     jamonWriter.write(", r");
351     // 242, 81
352     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getRevision()), jamonWriter);
353     // 242, 135
354     jamonWriter.write("</td>\n                    <td>Hadoop version and revision</td>\n                </tr>\n                <tr>\n                    <td>Hadoop Compiled</td>\n                    <td>");
355     // 247, 25
356     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getDate()), jamonWriter);
357     // 247, 75
358     jamonWriter.write(", ");
359     // 247, 77
360     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getUser()), jamonWriter);
361     // 247, 127
362     jamonWriter.write("</td>\n                    <td>When Hadoop version was compiled and by whom</td>\n                </tr>\n                <tr>\n                    <td>Zookeeper Quorum</td>\n                    <td> ");
363     // 253, 26
364     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter);
365     // 253, 48
366     jamonWriter.write(" </td>\n                    <td>Addresses of all registered ZK servers. For more, see <a href=\"/zk.jsp\">zk dump</a>.</td>\n                </tr>\n                <tr>\n                    <td>HBase Root Directory</td>\n                    <td>");
367     // 258, 25
368     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(FSUtils.getRootDir(master.getConfiguration()).toString()), jamonWriter);
369     // 258, 87
370     jamonWriter.write("</td>\n                    <td>Location of HBase home directory</td>\n                </tr>\n                <tr>\n                    <td>HMaster Start Time</td>\n                    <td>");
371     // 263, 25
372     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterStartTime())), jamonWriter);
373     // 263, 68
374     jamonWriter.write("</td>\n                    <td>Date stamp of when this HMaster was started</td>\n                </tr>\n                ");
375     // 266, 17
376     if (master.isActiveMaster() )
377     {
378       // 266, 48
379       jamonWriter.write("\n\t                <tr>\n\t                    <td>HMaster Active Time</td>\n\t                    <td>");
380       // 269, 26
381       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterActiveTime())), jamonWriter);
382       // 269, 70
383       jamonWriter.write("</td>\n\t                    <td>Date stamp of when this HMaster became active</td>\n\t                </tr>\n\t                <tr>\n\t                    <td>HBase Cluster ID</td>\n\t                    <td>");
384       // 274, 26
385       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getClusterId() != null ? master.getClusterId() : "Not set"), jamonWriter);
386       // 274, 97
387       jamonWriter.write("</td>\n\t                    <td>Unique identifier generated for each HBase cluster</td>\n\t                </tr>\n\t                <tr>\n\t                    <td>Load average</td>\n\t                    <td>");
388       // 279, 26
389       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerManager() == null ? "0.00" :
390 	                      StringUtils.limitDecimalTo2(master.getServerManager().getAverageLoad())), jamonWriter);
391       // 280, 98
392       jamonWriter.write("</td>\n\t                    <td>Average number of regions per regionserver. Naive computation.</td>\n\t                </tr>\n\t                ");
393       // 283, 18
394       if (frags != null )
395       {
396         // 283, 39
397         jamonWriter.write("\n\t                <tr>\n\t                    <td>Fragmentation</td>\n\t                    <td>");
398         // 286, 26
399         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get("-TOTAL-") != null ? frags.get("-TOTAL-").intValue() + "%" : "n/a"), jamonWriter);
400         // 286, 108
401         jamonWriter.write("</td>\n\t                    <td>Overall fragmentation of all tables, including hbase:meta</td>\n\t                </tr>\n\t                ");
402       }
403       // 289, 24
404       jamonWriter.write("\n\t                <tr>\n\t                    <td>Coprocessors</td>\n\t                    <td>");
405       // 292, 26
406       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getMasterCoprocessorHost() == null ? "[]" :
407 	                      java.util.Arrays.toString(master.getMasterCoprocessors())), jamonWriter);
408       // 293, 84
409       jamonWriter.write("</td>\n\t                    <td>Coprocessors currently loaded by the master</td>\n\t                </tr>\n                ");
410     }
411     // 296, 23
412     jamonWriter.write("\n            </table>\n        </section>\n        </div>\n    </div> <!-- /container -->\n\n    <script src=\"/static/js/jquery.min.js\" type=\"text/javascript\"></script>\n    <script src=\"/static/js/bootstrap.min.js\" type=\"text/javascript\"></script>\n    <script src=\"/static/js/tab.js\" type=\"text/javascript\"></script>\n  </body>\n</html>\n\n");
413   }
414   
415   
416   // 380, 1
417   private void __jamon_innerUnit__userSnapshots(@SuppressWarnings({"unused","hiding"}) final java.io.Writer jamonWriter)
418     throws java.io.IOException
419   {
420     // 381, 1
421     
422    List<SnapshotDescription> snapshots = master.isInitialized() ? admin.listSnapshots() : null;
423 
424     // 384, 1
425     if ((snapshots != null && snapshots.size() > 0))
426     {
427       // 384, 51
428       jamonWriter.write("\n<table class=\"table table-striped\">\n    <tr>\n        <th>Snapshot Name</th>\n        <th>Table</th>\n        <th>Creation Time</th>\n    </tr>\n    ");
429       // 391, 5
430       for (SnapshotDescription snapshotDesc : snapshots)
431       {
432         // 391, 57
433         jamonWriter.write("\n    ");
434         // 392, 5
435         
436         TableName snapshotTable = TableName.valueOf(snapshotDesc.getTable());
437     
438         // 395, 5
439         jamonWriter.write("<tr>\n        <td><a href=\"snapshot.jsp?name=");
440         // 396, 40
441         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getName()), jamonWriter);
442         // 396, 68
443         jamonWriter.write("\">");
444         // 396, 70
445         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getName()), jamonWriter);
446         // 396, 98
447         jamonWriter.write("</a> </td>\n        <td><a href=\"table.jsp?name=");
448         // 397, 37
449         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotTable.getNameAsString()), jamonWriter);
450         // 397, 74
451         jamonWriter.write("\">");
452         // 397, 76
453         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotTable.getNameAsString()), jamonWriter);
454         // 397, 113
455         jamonWriter.write("</a>\n        </td>\n        <td>");
456         // 399, 13
457         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(snapshotDesc.getCreationTime())), jamonWriter);
458         // 399, 59
459         jamonWriter.write("</td>\n    </tr>\n    ");
460       }
461       // 401, 12
462       jamonWriter.write("\n    <p>");
463       // 402, 8
464       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshots.size()), jamonWriter);
465       // 402, 30
466       jamonWriter.write(" snapshot(s) in set.</p>\n</table>\n");
467     }
468     // 404, 7
469     jamonWriter.write("\n");
470   }
471   
472   
473   // 308, 1
474   private void __jamon_innerUnit__catalogTables(@SuppressWarnings({"unused","hiding"}) final java.io.Writer jamonWriter)
475     throws java.io.IOException
476   {
477     // 309, 1
478     
479  HTableDescriptor[] sysTables = master.isInitialized() ? admin.listTableDescriptorsByNamespace(
480    NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR) : null;
481 
482     // 313, 1
483     if ((sysTables != null && sysTables.length > 0))
484     {
485       // 313, 51
486       jamonWriter.write("\n<table class=\"table table-striped\">\n<tr>\n    <th>Table Name</th>\n    ");
487       // 317, 5
488       if ((frags != null) )
489       {
490         // 317, 28
491         jamonWriter.write("\n        <th title=\"Fragmentation - Will be 0% after a major compaction and fluctuate during normal usage.\">Frag.</th>\n    ");
492       }
493       // 319, 11
494       jamonWriter.write("\n    <th>Description</th>\n</tr>\n");
495       // 322, 1
496       for (HTableDescriptor systemTable : sysTables)
497       {
498         // 322, 49
499         jamonWriter.write("\n<tr>\n");
500         // 324, 1
501         TableName tableName = systemTable.getTableName();
502         // 325, 5
503         jamonWriter.write("<td><a href=\"table.jsp?name=");
504         // 325, 33
505         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName), jamonWriter);
506         // 325, 48
507         jamonWriter.write("\">");
508         // 325, 50
509         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName), jamonWriter);
510         // 325, 65
511         jamonWriter.write("</a></td>\n    ");
512         // 326, 5
513         if ((frags != null))
514         {
515           // 326, 27
516           jamonWriter.write("\n        <td align=\"center\">");
517           // 327, 28
518           org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get(tableName.getNameAsString()) != null ? frags.get(tableName.getNameAsString())
519         .intValue() + "%" : "n/a"), jamonWriter);
520           // 328, 37
521           jamonWriter.write("</td>\n    ");
522         }
523         // 329, 11
524         jamonWriter.write("\n    ");
525         // 330, 5
526         String description = null;
527         if (tableName.equals(TableName.META_TABLE_NAME)){
528             description = "The hbase:meta table holds references to all User Table regions";
529         } else if (tableName.equals(AccessControlLists.ACL_TABLE_NAME)){
530             description = "The hbase:acl table holds information about acl";
531 	 } else if (tableName.equals(VisibilityConstants.LABELS_TABLE_NAME)){
532 	     description = "The hbase:labels table holds information about visibility labels";
533         } else {
534             description = "The .NAMESPACE. table holds information about namespaces.";
535         }
536     
537         // 341, 5
538         jamonWriter.write("<td>");
539         // 341, 9
540         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(description), jamonWriter);
541         // 341, 26
542         jamonWriter.write("</td>\n</tr>\n");
543       }
544       // 343, 8
545       jamonWriter.write("\n</table>\n");
546     }
547     // 345, 7
548     jamonWriter.write("\n");
549   }
550   
551   
552   // 348, 1
553   private void __jamon_innerUnit__userTables(@SuppressWarnings({"unused","hiding"}) final java.io.Writer jamonWriter)
554     throws java.io.IOException
555   {
556     // 349, 1
557     
558    HTableDescriptor[] tables = master.isInitialized() ? admin.listTables() : null;
559 
560     // 352, 1
561     if ((tables != null && tables.length > 0))
562     {
563       // 352, 45
564       jamonWriter.write("\n<table class=\"table table-striped\">\n    <tr>\n        <th>Namespace</th>\n        <th>Table Name</th>\n        ");
565       // 357, 9
566       if ((frags != null) )
567       {
568         // 357, 32
569         jamonWriter.write("\n            <th title=\"Fragmentation - Will be 0% after a major compaction and fluctuate during normal usage.\">Frag.</th>\n        ");
570       }
571       // 359, 15
572       jamonWriter.write("\n        <th>Online Regions</th>\n        <th>Description</th>\n    </tr>\n    ");
573       // 363, 5
574       for (HTableDescriptor htDesc : tables)
575       {
576         // 363, 45
577         jamonWriter.write("\n    <tr>\n        <td>");
578         // 365, 13
579         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(htDesc.getTableName().getNamespaceAsString()), jamonWriter);
580         // 365, 63
581         jamonWriter.write("</td>\n        <td><a href=table.jsp?name=");
582         // 366, 36
583         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(htDesc.getTableName().getNameAsString()), jamonWriter);
584         // 366, 81
585         jamonWriter.write(">");
586         // 366, 82
587         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(htDesc.getTableName().getQualifierAsString()), jamonWriter);
588         // 366, 132
589         jamonWriter.write("</a> </td>\n        ");
590         // 367, 9
591         if ((frags != null) )
592         {
593           // 367, 32
594           jamonWriter.write("\n            <td align=\"center\">");
595           // 368, 32
596           org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get(htDesc.getTableName().getNameAsString()) != null ? frags.get(htDesc.getTableName().getQualifierAsString()).intValue() + "%" : "n/a"), jamonWriter);
597           // 368, 179
598           jamonWriter.write("</td>\n        ");
599         }
600         // 369, 15
601         jamonWriter.write("\n        <td>");
602         // 370, 13
603         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getAssignmentManager().getRegionStates().getRegionsOfTable(htDesc
604         .getTableName()).size()), jamonWriter);
605         // 371, 35
606         jamonWriter.write("\n        <td>");
607         // 372, 13
608         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(htDesc.toStringCustomizedValues()), jamonWriter);
609         // 372, 52
610         jamonWriter.write("</td>\n    </tr>\n    ");
611       }
612       // 374, 12
613       jamonWriter.write("\n    <p>");
614       // 375, 8
615       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tables.length), jamonWriter);
616       // 375, 27
617       jamonWriter.write(" table(s) in set. [<a href=tablesDetailed.jsp>Details</a>]</p>\n</table>\n");
618     }
619     // 377, 7
620     jamonWriter.write("\n");
621   }
622   
623   
624   // 408, 1
625   private void __jamon_innerUnit__deadRegionServers(@SuppressWarnings({"unused","hiding"}) final java.io.Writer jamonWriter)
626     throws java.io.IOException
627   {
628     // 410, 1
629     if ((deadServers != null && deadServers.size() > 0))
630     {
631       // 410, 55
632       jamonWriter.write("\n<h2>Dead Region Servers</h2>\n<table class=\"table table-striped\">\n    <tr>\n        <th></th>\n        <th>ServerName</th>\n        <th>Stop time</th>\n    </tr>\n    ");
633       // 418, 5
634       
635        DeadServer deadServerUtil = master.getServerManager().getDeadServers();
636        ServerName [] deadServerNames = deadServers.toArray(new ServerName[deadServers.size()]);
637          Arrays.sort(deadServerNames);
638          for (ServerName deadServerName: deadServerNames) {
639     
640       // 424, 5
641       jamonWriter.write("<tr>\n    \t<th></th>\n        <td>");
642       // 426, 13
643       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerName), jamonWriter);
644       // 426, 33
645       jamonWriter.write("</td>\n        <td>");
646       // 427, 13
647       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerUtil.getTimeOfDeath(deadServerName)), jamonWriter);
648       // 427, 64
649       jamonWriter.write("</td>\n    </tr>\n    ");
650       // 429, 5
651       
652         }
653     
654       // 432, 5
655       jamonWriter.write("<tr>\n        <th>Total: </th>\n        <td>servers: ");
656       // 434, 22
657       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServers.size()), jamonWriter);
658       // 434, 46
659       jamonWriter.write("</td>\n        <th></th>\n    </tr>\n</table>\n");
660     }
661     // 438, 7
662     jamonWriter.write("\n");
663     // 439, 1
664     
665    HConnectionManager.deleteConnection(admin.getConfiguration());
666 
667   }
668   
669   
670 }