View Javadoc

1   // Autogenerated Jamon implementation
2   // /home/jenkins/jenkins-slave/workspace/hbase_generate_website/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/ServerMetricsTmpl.jamon
3   
4   package org.apache.hadoop.hbase.tmpl.regionserver;
5   
6   // 24, 1
7   import java.util.*;
8   // 25, 1
9   import org.apache.hadoop.hbase.regionserver.HRegionServer;
10  // 26, 1
11  import org.apache.hadoop.hbase.ipc.MetricsHBaseServerWrapper;
12  // 27, 1
13  import org.apache.hadoop.hbase.regionserver.MetricsRegionServerWrapper;
14  // 28, 1
15  import org.apache.hadoop.hbase.util.Bytes;
16  // 29, 1
17  import org.apache.hadoop.hbase.HRegionInfo;
18  // 30, 1
19  import org.apache.hadoop.hbase.ServerName;
20  // 31, 1
21  import org.apache.hadoop.hbase.HBaseConfiguration;
22  // 32, 1
23  import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
24  // 33, 1
25  import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo;
26  // 34, 1
27  import org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionLoad;
28  // 35, 1
29  import org.apache.hadoop.hbase.util.DirectMemoryUtils;
30  // 36, 1
31  import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
32  // 37, 1
33  import java.lang.management.ManagementFactory;
34  
35  public class ServerMetricsTmplImpl
36    extends org.jamon.AbstractTemplateImpl
37    implements org.apache.hadoop.hbase.tmpl.regionserver.ServerMetricsTmpl.Intf
38  
39  {
40    private final MetricsRegionServerWrapper mWrap;
41    private final MetricsHBaseServerWrapper mServerWrap;
42    protected static org.apache.hadoop.hbase.tmpl.regionserver.ServerMetricsTmpl.ImplData __jamon_setOptionalArguments(org.apache.hadoop.hbase.tmpl.regionserver.ServerMetricsTmpl.ImplData p_implData)
43    {
44      return p_implData;
45    }
46    public ServerMetricsTmplImpl(org.jamon.TemplateManager p_templateManager, org.apache.hadoop.hbase.tmpl.regionserver.ServerMetricsTmpl.ImplData p_implData)
47    {
48      super(p_templateManager, __jamon_setOptionalArguments(p_implData));
49      mWrap = p_implData.getMWrap();
50      mServerWrap = p_implData.getMServerWrap();
51    }
52    
53    @Override public void renderNoFlush(final java.io.Writer jamonWriter)
54      throws java.io.IOException
55    {
56      // 39, 1
57      jamonWriter.write("<div class=\"tabbable\">\n    <ul class=\"nav nav-pills\">\n        <li class=\"active\"><a href=\"#tab_baseStats\" data-toggle=\"tab\">Base Stats</a></li>\n        <li class=\"\"><a href=\"#tab_memoryStats\" data-toggle=\"tab\">Memory</a></li>\n        <li class=\"\"><a href=\"#tab_requestStats\" data-toggle=\"tab\">Requests</a></li>\n        <li class=\"\"><a href=\"#tab_walStats\" data-toggle=\"tab\">WALs</a></li>\n        <li class=\"\"><a href=\"#tab_storeStats\" data-toggle=\"tab\">Storefiles</a></li>\n        <li class=\"\"><a href=\"#tab_queueStats\" data-toggle=\"tab\">Queues</a></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_baseStats\">\n            ");
58      // 50, 13
59      {
60        // 50, 13
61        __jamon_innerUnit__baseStats(jamonWriter, mWrap );
62      }
63      // 50, 43
64      jamonWriter.write("\n        </div>\n        <div class=\"tab-pane\" id=\"tab_memoryStats\">\n            ");
65      // 53, 13
66      {
67        // 53, 13
68        __jamon_innerUnit__memoryStats(jamonWriter, mWrap );
69      }
70      // 53, 45
71      jamonWriter.write("\n        </div>\n        <div class=\"tab-pane\" id=\"tab_requestStats\">\n            ");
72      // 56, 13
73      {
74        // 56, 13
75        __jamon_innerUnit__requestStats(jamonWriter, mWrap );
76      }
77      // 56, 46
78      jamonWriter.write("\n        </div>\n        <div class=\"tab-pane\" id=\"tab_walStats\">\n            ");
79      // 59, 13
80      {
81        // 59, 13
82        __jamon_innerUnit__walStats(jamonWriter, mWrap );
83      }
84      // 59, 42
85      jamonWriter.write("\n        </div>\n        <div class=\"tab-pane\" id=\"tab_storeStats\">\n            ");
86      // 62, 13
87      {
88        // 62, 13
89        __jamon_innerUnit__storeStats(jamonWriter, mWrap );
90      }
91      // 62, 44
92      jamonWriter.write("\n        </div>\n        <div class=\"tab-pane\" id=\"tab_queueStats\">\n            ");
93      // 65, 13
94      {
95        // 65, 13
96        __jamon_innerUnit__queueStats(jamonWriter, mWrap, mServerWrap);
97      }
98      // 65, 72
99      jamonWriter.write("\n        </div>\n    </div>\n</div>\n\n");
100   }
101   
102   
103   // 169, 1
104   private void __jamon_innerUnit__requestStats(final java.io.Writer jamonWriter, final MetricsRegionServerWrapper mWrap)
105     throws java.io.IOException
106   {
107     // 173, 1
108     jamonWriter.write("<table class=\"table table-striped\">\n<tr>\n    <th>Request Per Second</th>\n    <th>Read Request Count</th>\n    <th>Filtered Read Request Count</th>\n    <th>Write Request Count</th>\n</tr>\n<tr>\n    <td>");
109     // 181, 9
110     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(String.format("%.0f", mWrap.getRequestsPerSecond())), jamonWriter);
111     // 181, 66
112     jamonWriter.write("</td>\n    <td>");
113     // 182, 9
114     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(mWrap.getReadRequestsCount()), jamonWriter);
115     // 182, 43
116     jamonWriter.write("</td>\n    <td>");
117     // 183, 9
118     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(mWrap.getFilteredReadRequestsCount()), jamonWriter);
119     // 183, 51
120     jamonWriter.write("</td>\n    <td>");
121     // 184, 9
122     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(mWrap.getWriteRequestsCount()), jamonWriter);
123     // 184, 44
124     jamonWriter.write("</td>\n</tr>\n</table>\n");
125   }
126   
127   
128   // 189, 1
129   private void __jamon_innerUnit__queueStats(final java.io.Writer jamonWriter, final MetricsRegionServerWrapper mWrap, final MetricsHBaseServerWrapper mServerWrap)
130     throws java.io.IOException
131   {
132     // 194, 1
133     jamonWriter.write("<table class=\"table table-striped\">\n<tr>\n    <th>Compaction Queue Size</th>\n    <th>Flush Queue Size</th>\n    <th>Call Queue Size (bytes)</th>\n\n</tr>\n<tr>\n    <td>");
134     // 202, 9
135     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(mWrap.getCompactionQueueSize()), jamonWriter);
136     // 202, 45
137     jamonWriter.write("</td>\n    <td>");
138     // 203, 9
139     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(mWrap.getFlushQueueSize()), jamonWriter);
140     // 203, 40
141     jamonWriter.write("</td>\n    <td>");
142     // 204, 9
143     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(TraditionalBinaryPrefix.long2String(mServerWrap.getTotalQueueSize(), "B", 1)), jamonWriter);
144     // 204, 91
145     jamonWriter.write("</td>\n</tr>\n</table>\n");
146   }
147   
148   
149   // 93, 1
150   private void __jamon_innerUnit__memoryStats(final java.io.Writer jamonWriter, final MetricsRegionServerWrapper mWrap)
151     throws java.io.IOException
152   {
153     // 97, 1
154     jamonWriter.write("<table class=\"table table-striped\">\n<tr>\n    <tr>\n        <th>Used Heap</th>\n        <th>Max Heap</th>\n        <th>Direct Memory Used</th>\n        <th>Direct Memory Configured</th>\n        <th>Memstore Size</th>\n    </tr>\n</tr>\n<tr>\n    <td>\n        ");
155     // 109, 9
156     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(TraditionalBinaryPrefix.long2String(
157             ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getUsed(), "B", 1)), jamonWriter);
158     // 110, 91
159     jamonWriter.write("\n    </td>\n    <td>\n        ");
160     // 113, 9
161     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(TraditionalBinaryPrefix.long2String(
162             ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getMax(), "B", 1)), jamonWriter);
163     // 114, 90
164     jamonWriter.write("\n    </td>\n    <td>\n        ");
165     // 117, 9
166     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(TraditionalBinaryPrefix.long2String(DirectMemoryUtils.getDirectMemoryUsage(), "B", 1)), jamonWriter);
167     // 117, 100
168     jamonWriter.write("\n    </td>\n    <td>\n        ");
169     // 120, 9
170     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(TraditionalBinaryPrefix.long2String(DirectMemoryUtils.getDirectMemorySize(), "B", 1)), jamonWriter);
171     // 120, 99
172     jamonWriter.write("\n    </td>\n    <td>");
173     // 122, 9
174     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(TraditionalBinaryPrefix.long2String(mWrap.getMemstoreSize(), "B", 1)), jamonWriter);
175     // 122, 83
176     jamonWriter.write("</td>\n</tr>\n</table>\n");
177   }
178   
179   
180   // 70, 1
181   private void __jamon_innerUnit__baseStats(final java.io.Writer jamonWriter, final MetricsRegionServerWrapper mWrap)
182     throws java.io.IOException
183   {
184     // 74, 1
185     jamonWriter.write("<table class=\"table table-striped\">\n    <tr>\n\n        <th>Requests Per Second</th>\n        <th>Num. Regions</th>\n        <th>Block locality</th>\n        <th>Block locality (Secondary replicas)</th>\n        <th>Slow WAL Append Count</th>\n    </tr>\n    <tr>\n        <td>");
186     // 84, 13
187     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(String.format("%.0f", mWrap.getRequestsPerSecond())), jamonWriter);
188     // 84, 70
189     jamonWriter.write("</td>\n        <td>");
190     // 85, 13
191     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(mWrap.getNumOnlineRegions()), jamonWriter);
192     // 85, 46
193     jamonWriter.write("</td>\n        <td>");
194     // 86, 13
195     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(mWrap.getPercentFileLocal()), jamonWriter);
196     // 86, 46
197     jamonWriter.write("</td>\n        <td>");
198     // 87, 13
199     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(mWrap.getPercentFileLocalSecondaryRegions()), jamonWriter);
200     // 87, 62
201     jamonWriter.write("</td>\n        <td>");
202     // 88, 13
203     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(mWrap.getNumWALSlowAppend()), jamonWriter);
204     // 88, 46
205     jamonWriter.write("</td>\n    </tr>\n</table>\n");
206   }
207   
208   
209   // 127, 1
210   private void __jamon_innerUnit__walStats(final java.io.Writer jamonWriter, final MetricsRegionServerWrapper mWrap)
211     throws java.io.IOException
212   {
213     // 131, 1
214     jamonWriter.write("<table class=\"table table-striped\">\n<tr>\n    <tr>\n        <th>Num. WAL Files</th>\n        <th>Size. WAL Files (bytes)</th>\n    </tr>\n</tr>\n<tr>\n    <td>");
215     // 139, 9
216     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(mWrap.getNumWALFiles()), jamonWriter);
217     // 139, 37
218     jamonWriter.write("</td>\n    <td>");
219     // 140, 9
220     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(TraditionalBinaryPrefix.long2String(mWrap.getWALFileSize(), "B", 1)), jamonWriter);
221     // 140, 82
222     jamonWriter.write("</td>\n</tr>\n</table>\n");
223   }
224   
225   
226   // 145, 1
227   private void __jamon_innerUnit__storeStats(final java.io.Writer jamonWriter, final MetricsRegionServerWrapper mWrap)
228     throws java.io.IOException
229   {
230     // 149, 1
231     jamonWriter.write("<table class=\"table table-striped\">\n<tr>\n\n    <th>Num. Stores</th>\n    <th>Num. Storefiles</th>\n    <th>Root Index Size (bytes)</th>\n    <th>Index Size (bytes)</th>\n    <th>Bloom Size (bytes)</th>\n</tr>\n<tr>\n    <td>");
232     // 159, 9
233     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(mWrap.getNumStores()), jamonWriter);
234     // 159, 35
235     jamonWriter.write("</td>\n    <td>");
236     // 160, 9
237     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(mWrap.getNumStoreFiles()), jamonWriter);
238     // 160, 39
239     jamonWriter.write("</td>\n    <td>");
240     // 161, 9
241     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(TraditionalBinaryPrefix.long2String(mWrap.getStoreFileIndexSize(), "B", 1)), jamonWriter);
242     // 161, 89
243     jamonWriter.write("</td>\n    <td>");
244     // 162, 9
245     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(TraditionalBinaryPrefix.long2String(mWrap.getTotalStaticIndexSize(), "B", 1)), jamonWriter);
246     // 162, 91
247     jamonWriter.write("</td>\n    <td>");
248     // 163, 9
249     org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(TraditionalBinaryPrefix.long2String(mWrap.getTotalStaticBloomSize(), "B", 1)), jamonWriter);
250     // 163, 91
251     jamonWriter.write("</td>\n</tr>\n</table>\n");
252   }
253   
254   
255 }