View Javadoc

1   // Autogenerated Jamon implementation
2   // /Users/stack/checkouts/hbase.git.commit/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 String format;
59    private final ServerManager serverManager;
60    private final Map<String,Integer> frags;
61    private final List<ServerName> servers;
62    private final AssignmentManager assignmentManager;
63    private final String filter;
64    private final Set<ServerName> deadServers;
65    private final boolean catalogJanitorEnabled;
66    private final ServerName metaLocation;
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.getFormat__IsNotDefault())
98      {
99        p_implData.setFormat("html");
100     }
101     if(! p_implData.getServerManager__IsNotDefault())
102     {
103       p_implData.setServerManager(null);
104     }
105     if(! p_implData.getFrags__IsNotDefault())
106     {
107       p_implData.setFrags(null);
108     }
109     if(! p_implData.getServers__IsNotDefault())
110     {
111       p_implData.setServers(null);
112     }
113     if(! p_implData.getAssignmentManager__IsNotDefault())
114     {
115       p_implData.setAssignmentManager(null);
116     }
117     if(! p_implData.getFilter__IsNotDefault())
118     {
119       p_implData.setFilter("general");
120     }
121     if(! p_implData.getDeadServers__IsNotDefault())
122     {
123       p_implData.setDeadServers(null);
124     }
125     if(! p_implData.getCatalogJanitorEnabled__IsNotDefault())
126     {
127       p_implData.setCatalogJanitorEnabled(true);
128     }
129     if(! p_implData.getMetaLocation__IsNotDefault())
130     {
131       p_implData.setMetaLocation(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     format = p_implData.getFormat();
141     serverManager = p_implData.getServerManager();
142     frags = p_implData.getFrags();
143     servers = p_implData.getServers();
144     assignmentManager = p_implData.getAssignmentManager();
145     filter = p_implData.getFilter();
146     deadServers = p_implData.getDeadServers();
147     catalogJanitorEnabled = p_implData.getCatalogJanitorEnabled();
148     metaLocation = p_implData.getMetaLocation();
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_0 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager());
162         __jamon__var_0.setFilter(filter);
163         __jamon__var_0.setFormat("json" );
164         __jamon__var_0.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_1 = new org.apache.hadoop.hbase.tmpl.master.RegionServerListTmpl(this.getTemplateManager());
224         __jamon__var_1.setServers(servers );
225         __jamon__var_1.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_2 = new org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl(this.getTemplateManager());
247         __jamon__var_2.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\">Catalog 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_3 = new org.apache.hadoop.hbase.tmpl.master.AssignmentManagerStatusTmpl(this.getTemplateManager());
296           __jamon__var_3.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_4 = new org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl(this.getTemplateManager());
312         __jamon__var_4.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_5 = new org.apache.hadoop.hbase.tmpl.common.TaskMonitorTmpl(this.getTemplateManager());
322       __jamon__var_5.setFilter(filter );
323       __jamon__var_5.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>Hadoop Version</td>\n                    <td>");
343     // 237, 25
344     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getVersion()), jamonWriter);
345     // 237, 78
346     jamonWriter.write(", r");
347     // 237, 81
348     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getRevision()), jamonWriter);
349     // 237, 135
350     jamonWriter.write("</td>\n                    <td>Hadoop version and revision</td>\n                </tr>\n                <tr>\n                    <td>Hadoop Compiled</td>\n                    <td>");
351     // 242, 25
352     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getDate()), jamonWriter);
353     // 242, 75
354     jamonWriter.write(", ");
355     // 242, 77
356     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(org.apache.hadoop.util.VersionInfo.getUser()), jamonWriter);
357     // 242, 127
358     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> ");
359     // 248, 26
360     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(formatZKString()), jamonWriter);
361     // 248, 48
362     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>");
363     // 253, 25
364     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(FSUtils.getRootDir(master.getConfiguration()).toString()), jamonWriter);
365     // 253, 87
366     jamonWriter.write("</td>\n                    <td>Location of HBase home directory</td>\n                </tr>\n                <tr>\n                    <td>HMaster Start Time</td>\n                    <td>");
367     // 258, 25
368     org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterStartTime())), jamonWriter);
369     // 258, 68
370     jamonWriter.write("</td>\n                    <td>Date stamp of when this HMaster was started</td>\n                </tr>\n                ");
371     // 261, 17
372     if (master.isActiveMaster() )
373     {
374       // 261, 48
375       jamonWriter.write("\n\t                <tr>\n\t                    <td>HMaster Active Time</td>\n\t                    <td>");
376       // 264, 26
377       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(master.getMasterActiveTime())), jamonWriter);
378       // 264, 70
379       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>");
380       // 269, 26
381       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getClusterId() != null ? master.getClusterId() : "Not set"), jamonWriter);
382       // 269, 97
383       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>");
384       // 274, 26
385       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getServerManager() == null ? "0.00" :
386 	                      StringUtils.limitDecimalTo2(master.getServerManager().getAverageLoad())), jamonWriter);
387       // 275, 98
388       jamonWriter.write("</td>\n\t                    <td>Average number of regions per regionserver. Naive computation.</td>\n\t                </tr>\n\t                ");
389       // 278, 18
390       if (frags != null )
391       {
392         // 278, 39
393         jamonWriter.write("\n\t                <tr>\n\t                    <td>Fragmentation</td>\n\t                    <td>");
394         // 281, 26
395         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get("-TOTAL-") != null ? frags.get("-TOTAL-").intValue() + "%" : "n/a"), jamonWriter);
396         // 281, 108
397         jamonWriter.write("</td>\n\t                    <td>Overall fragmentation of all tables, including hbase:meta</td>\n\t                </tr>\n\t                ");
398       }
399       // 284, 24
400       jamonWriter.write("\n\t                <tr>\n\t                    <td>Coprocessors</td>\n\t                    <td>");
401       // 287, 26
402       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getMasterCoprocessorHost() == null ? "[]" :
403 	                      java.util.Arrays.toString(master.getMasterCoprocessors())), jamonWriter);
404       // 288, 84
405       jamonWriter.write("</td>\n\t                    <td>Coprocessors currently loaded by the master</td>\n\t                </tr>\n                ");
406     }
407     // 291, 23
408     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");
409   }
410   
411   
412   // 373, 1
413   private void __jamon_innerUnit__userSnapshots(@SuppressWarnings({"unused","hiding"}) final java.io.Writer jamonWriter)
414     throws java.io.IOException
415   {
416     // 374, 1
417     
418    List<SnapshotDescription> snapshots = master.isInitialized() ? admin.listSnapshots() : null;
419 
420     // 377, 1
421     if ((snapshots != null && snapshots.size() > 0))
422     {
423       // 377, 51
424       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    ");
425       // 384, 5
426       for (SnapshotDescription snapshotDesc : snapshots)
427       {
428         // 384, 57
429         jamonWriter.write("\n    ");
430         // 385, 5
431         
432         TableName snapshotTable = TableName.valueOf(snapshotDesc.getTable());
433     
434         // 388, 5
435         jamonWriter.write("<tr>\n        <td><a href=\"snapshot.jsp?name=");
436         // 389, 40
437         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getName()), jamonWriter);
438         // 389, 68
439         jamonWriter.write("\">");
440         // 389, 70
441         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotDesc.getName()), jamonWriter);
442         // 389, 98
443         jamonWriter.write("</a> </td>\n        <td><a href=\"table.jsp?name=");
444         // 390, 37
445         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotTable.getNameAsString()), jamonWriter);
446         // 390, 74
447         jamonWriter.write("\">");
448         // 390, 76
449         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshotTable.getNameAsString()), jamonWriter);
450         // 390, 113
451         jamonWriter.write("</a>\n        </td>\n        <td>");
452         // 392, 13
453         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(new Date(snapshotDesc.getCreationTime())), jamonWriter);
454         // 392, 59
455         jamonWriter.write("</td>\n    </tr>\n    ");
456       }
457       // 394, 12
458       jamonWriter.write("\n    <p>");
459       // 395, 8
460       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(snapshots.size()), jamonWriter);
461       // 395, 30
462       jamonWriter.write(" snapshot(s) in set.</p>\n</table>\n");
463     }
464     // 397, 7
465     jamonWriter.write("\n");
466   }
467   
468   
469   // 303, 1
470   private void __jamon_innerUnit__catalogTables(@SuppressWarnings({"unused","hiding"}) final java.io.Writer jamonWriter)
471     throws java.io.IOException
472   {
473     // 304, 1
474     
475  HTableDescriptor[] sysTables = master.isInitialized() ? admin.listTableDescriptorsByNamespace(
476    NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR) : null;
477 
478     // 308, 1
479     if ((sysTables != null && sysTables.length > 0))
480     {
481       // 308, 51
482       jamonWriter.write("\n<table class=\"table table-striped\">\n<tr>\n    <th>Table Name</th>\n    ");
483       // 312, 5
484       if ((frags != null) )
485       {
486         // 312, 28
487         jamonWriter.write("\n        <th title=\"Fragmentation - Will be 0% after a major compaction and fluctuate during normal usage.\">Frag.</th>\n    ");
488       }
489       // 314, 11
490       jamonWriter.write("\n    <th>Description</th>\n</tr>\n");
491       // 317, 1
492       for (HTableDescriptor systemTable : sysTables)
493       {
494         // 317, 49
495         jamonWriter.write("\n<tr>\n");
496         // 319, 1
497         TableName tableName = systemTable.getTableName();
498         // 320, 5
499         jamonWriter.write("<td><a href=\"table.jsp?name=");
500         // 320, 33
501         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName), jamonWriter);
502         // 320, 48
503         jamonWriter.write("\">");
504         // 320, 50
505         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tableName), jamonWriter);
506         // 320, 65
507         jamonWriter.write("</a></td>\n    ");
508         // 321, 5
509         if ((frags != null))
510         {
511           // 321, 27
512           jamonWriter.write("\n        <td align=\"center\">");
513           // 322, 28
514           org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get(tableName.getNameAsString()) != null ? frags.get(tableName.getNameAsString())
515         .intValue() + "%" : "n/a"), jamonWriter);
516           // 323, 37
517           jamonWriter.write("</td>\n    ");
518         }
519         // 324, 11
520         jamonWriter.write("\n    ");
521         // 325, 5
522         String description = null;
523         if (tableName.equals(TableName.META_TABLE_NAME)){
524             description = "The hbase:meta table holds references to all User Table regions";
525         } else if (tableName.equals(AccessControlLists.ACL_TABLE_NAME)){
526             description = "The hbase:acl table holds information about acl";
527 	 } else if (tableName.equals(VisibilityConstants.LABELS_TABLE_NAME)){
528 	     description = "The hbase:labels table holds information about visibility labels";
529         } else {
530             description = "The .NAMESPACE. table holds information about namespaces.";
531         }
532     
533         // 336, 5
534         jamonWriter.write("<td>");
535         // 336, 9
536         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(description), jamonWriter);
537         // 336, 26
538         jamonWriter.write("</td>\n</tr>\n");
539       }
540       // 338, 8
541       jamonWriter.write("\n</table>\n");
542     }
543     // 340, 7
544     jamonWriter.write("\n");
545   }
546   
547   
548   // 343, 1
549   private void __jamon_innerUnit__userTables(@SuppressWarnings({"unused","hiding"}) final java.io.Writer jamonWriter)
550     throws java.io.IOException
551   {
552     // 344, 1
553     
554    HTableDescriptor[] tables = master.isInitialized() ? admin.listTables() : null;
555 
556     // 347, 1
557     if ((tables != null && tables.length > 0))
558     {
559       // 347, 45
560       jamonWriter.write("\n<table class=\"table table-striped\">\n    <tr>\n        <th>Table Name</th>\n        ");
561       // 351, 9
562       if ((frags != null) )
563       {
564         // 351, 32
565         jamonWriter.write("\n            <th title=\"Fragmentation - Will be 0% after a major compaction and fluctuate during normal usage.\">Frag.</th>\n        ");
566       }
567       // 353, 15
568       jamonWriter.write("\n        <th>Online Regions</th>\n        <th>Description</th>\n    </tr>\n    ");
569       // 357, 5
570       for (HTableDescriptor htDesc : tables)
571       {
572         // 357, 45
573         jamonWriter.write("\n    <tr>\n        <td><a href=table.jsp?name=");
574         // 359, 36
575         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(htDesc.getTableName().getNameAsString()), jamonWriter);
576         // 359, 81
577         jamonWriter.write(">");
578         // 359, 82
579         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(htDesc.getTableName().getNameAsString()), jamonWriter);
580         // 359, 127
581         jamonWriter.write("</a> </td>\n        ");
582         // 360, 9
583         if ((frags != null) )
584         {
585           // 360, 32
586           jamonWriter.write("\n            <td align=\"center\">");
587           // 361, 32
588           org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(frags.get(htDesc.getTableName().getNameAsString()) != null ? frags.get(htDesc.getTableName().getNameAsString()).intValue() + "%" : "n/a"), jamonWriter);
589           // 361, 174
590           jamonWriter.write("</td>\n        ");
591         }
592         // 362, 15
593         jamonWriter.write("\n        <td>");
594         // 363, 13
595         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(master.getAssignmentManager().getRegionStates().getRegionsOfTable(htDesc
596         .getTableName()).size()), jamonWriter);
597         // 364, 35
598         jamonWriter.write("\n        <td>");
599         // 365, 13
600         org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(htDesc.toStringCustomizedValues()), jamonWriter);
601         // 365, 52
602         jamonWriter.write("</td>\n    </tr>\n    ");
603       }
604       // 367, 12
605       jamonWriter.write("\n    <p>");
606       // 368, 8
607       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(tables.length), jamonWriter);
608       // 368, 27
609       jamonWriter.write(" table(s) in set. [<a href=tablesDetailed.jsp>Details</a>]</p>\n</table>\n");
610     }
611     // 370, 7
612     jamonWriter.write("\n");
613   }
614   
615   
616   // 401, 1
617   private void __jamon_innerUnit__deadRegionServers(@SuppressWarnings({"unused","hiding"}) final java.io.Writer jamonWriter)
618     throws java.io.IOException
619   {
620     // 403, 1
621     if ((deadServers != null && deadServers.size() > 0))
622     {
623       // 403, 55
624       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    ");
625       // 411, 5
626       
627        DeadServer deadServerUtil = master.getServerManager().getDeadServers();
628        ServerName [] deadServerNames = deadServers.toArray(new ServerName[deadServers.size()]);
629          Arrays.sort(deadServerNames);
630          for (ServerName deadServerName: deadServerNames) {
631     
632       // 417, 5
633       jamonWriter.write("<tr>\n    \t<th></th>\n        <td>");
634       // 419, 13
635       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerName), jamonWriter);
636       // 419, 33
637       jamonWriter.write("</td>\n        <td>");
638       // 420, 13
639       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServerUtil.getTimeOfDeath(deadServerName)), jamonWriter);
640       // 420, 64
641       jamonWriter.write("</td>\n    </tr>\n    ");
642       // 422, 5
643       
644         }
645     
646       // 425, 5
647       jamonWriter.write("<tr>\n        <th>Total: </th>\n        <td>servers: ");
648       // 427, 22
649       org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(deadServers.size()), jamonWriter);
650       // 427, 46
651       jamonWriter.write("</td>\n        <th></th>\n    </tr>\n</table>\n");
652     }
653     // 431, 7
654     jamonWriter.write("\n");
655     // 432, 1
656     
657    HConnectionManager.deleteConnection(admin.getConfiguration());
658 
659   }
660   
661   
662 }