View Javadoc

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