View Javadoc

1   /**
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *     http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  package org.apache.hadoop.hbase.regionserver;
20  
21  /**
22   * This is the interface that will expose RegionServer information to hadoop1/hadoop2
23   * implementations of the MetricsRegionServerSource.
24   */
25  public interface MetricsRegionServerWrapper {
26  
27    /**
28     * Get ServerName
29     */
30    String getServerName();
31  
32    /**
33     * Get the Cluster ID
34     *
35     * @return Cluster ID
36     */
37    String getClusterId();
38  
39    /**
40     * Get the ZooKeeper Quorum Info
41     *
42     * @return ZooKeeper Quorum Info
43     */
44    String getZookeeperQuorum();
45  
46    /**
47     * Get the co-processors
48     *
49     * @return Co-processors
50     */
51    String getCoprocessors();
52  
53    /**
54     * Get HRegionServer start time
55     *
56     * @return Start time of RegionServer in milliseconds
57     */
58    long getStartCode();
59  
60    /**
61     * The number of online regions
62     */
63    long getNumOnlineRegions();
64  
65    /**
66     * Get the number of stores hosted on this region server.
67     */
68    long getNumStores();
69  
70    /**
71     * Get the number of WAL files of this region server.
72     */
73    long getNumWALFiles();
74    
75    /**
76     * Get the size of WAL files of this region server.
77     */
78    long getWALFileSize();
79  
80    /**
81     * Get the number of WAL files with slow appends for this region server.
82     */
83    long getNumWALSlowAppend();
84  
85      /**
86       * Get the number of store files hosted on this region server.
87       */
88    long getNumStoreFiles();
89  
90    /**
91     * Get the size of the memstore on this region server.
92     */
93    long getMemstoreSize();
94  
95    /**
96     * Get the total size of the store files this region server is serving from.
97     */
98    long getStoreFileSize();
99  
100   /**
101    * @return Max age of store files hosted on this region server
102    */
103   long getMaxStoreFileAge();
104 
105   /**
106    * @return Min age of store files hosted on this region server
107    */
108   long getMinStoreFileAge();
109 
110   /**
111    *  @return Average age of store files hosted on this region server
112    */
113   long getAvgStoreFileAge();
114 
115   /**
116    *  @return Number of reference files on this region server
117    */
118   long getNumReferenceFiles();
119 
120   /**
121    * Get the number of requests per second.
122    */
123   double getRequestsPerSecond();
124 
125   /**
126    * Get the total number of requests per second.
127    */
128   long getTotalRequestCount();
129 
130   /**
131    * Get the number of read requests to regions hosted on this region server.
132    */
133   long getReadRequestsCount();
134 
135   /**
136    * Get the number of filtered read requests to regions hosted on this region server.
137    */
138   long getFilteredReadRequestsCount();
139 
140   /**
141    * Get the number of write requests to regions hosted on this region server.
142    */
143   long getWriteRequestsCount();
144 
145   /**
146    * Get the number of CAS operations that failed.
147    */
148   long getCheckAndMutateChecksFailed();
149 
150   /**
151    * Get the number of CAS operations that passed.
152    */
153   long getCheckAndMutateChecksPassed();
154 
155   /**
156    * Get the Size (in bytes) of indexes in storefiles on disk.
157    */
158   long getStoreFileIndexSize();
159 
160   /**
161    * Get the size (in bytes) of of the static indexes including the roots.
162    */
163   long getTotalStaticIndexSize();
164 
165   /**
166    * Get the size (in bytes) of the static bloom filters.
167    */
168   long getTotalStaticBloomSize();
169 
170   /**
171    * Number of mutations received with WAL explicitly turned off.
172    */
173   long getNumMutationsWithoutWAL();
174 
175   /**
176    * Ammount of data in the memstore but not in the WAL because mutations explicitly had their
177    * WAL turned off.
178    */
179   long getDataInMemoryWithoutWAL();
180 
181   /**
182    * Get the percent of HFiles' that are local.
183    */
184   double getPercentFileLocal();
185 
186   /**
187    * Get the percent of HFiles' that are local for secondary region replicas.
188    */
189   double getPercentFileLocalSecondaryRegions();
190 
191   /**
192    * Get the size of the split queue
193    */
194   int getSplitQueueSize();
195 
196   /**
197    * Get the size of the compaction queue
198    */
199   int getCompactionQueueSize();
200 
201   int getSmallCompactionQueueSize();
202 
203   int getLargeCompactionQueueSize();
204 
205   /**
206    * Get the size of the flush queue.
207    */
208   int getFlushQueueSize();
209 
210   /**
211    * Get the size (in bytes) of the block cache that is free.
212    */
213   long getBlockCacheFreeSize();
214 
215   /**
216    * Get the number of items in the block cache.
217    */
218   long getBlockCacheCount();
219 
220   /**
221    * Get the total size (in bytes) of the block cache.
222    */
223   long getBlockCacheSize();
224 
225   /**
226    * Get the count of hits to the block cache
227    */
228   long getBlockCacheHitCount();
229 
230   /**
231    * Get the count of hits to primary replica in the block cache
232    */
233   long getBlockCachePrimaryHitCount();
234 
235   /**
236    * Get the count of misses to the block cache.
237    */
238   long getBlockCacheMissCount();
239 
240   /**
241    * Get the count of misses to primary replica in the block cache.
242    */
243   long getBlockCachePrimaryMissCount();
244 
245   /**
246    * Get the number of items evicted from the block cache.
247    */
248   long getBlockCacheEvictedCount();
249 
250   /**
251    * Get the number of items evicted from primary replica in the block cache.
252    */
253   long getBlockCachePrimaryEvictedCount();
254 
255 
256   /**
257    * Get the percent of all requests that hit the block cache.
258    */
259   double getBlockCacheHitPercent();
260 
261   /**
262    * Get the percent of requests with the block cache turned on that hit the block cache.
263    */
264   double getBlockCacheHitCachingPercent();
265 
266   /**
267    * Number of cache insertions that failed.
268    */
269   long getBlockCacheFailedInsertions();
270 
271   /**
272    * Force a re-computation of the metrics.
273    */
274   void forceRecompute();
275 
276   /**
277    * Get the amount of time that updates were blocked.
278    */
279   long getUpdatesBlockedTime();
280 
281   /**
282    * Get the number of cells flushed to disk.
283    */
284   long getFlushedCellsCount();
285 
286   /**
287    * Get the number of cells processed during minor compactions.
288    */
289   long getCompactedCellsCount();
290 
291   /**
292    * Get the number of cells processed during major compactions.
293    */
294   long getMajorCompactedCellsCount();
295 
296   /**
297    * Get the total amount of data flushed to disk, in bytes.
298    */
299   long getFlushedCellsSize();
300 
301   /**
302    * Get the total amount of data processed during minor compactions, in bytes.
303    */
304   long getCompactedCellsSize();
305 
306   /**
307    * Get the total amount of data processed during major compactions, in bytes.
308    */
309   long getMajorCompactedCellsSize();
310 
311   /**
312    * Gets the number of cells moved to mob during compaction.
313    */
314   long getCellsCountCompactedToMob();
315 
316   /**
317    * Gets the number of cells moved from mob during compaction.
318    */
319   long getCellsCountCompactedFromMob();
320 
321   /**
322    * Gets the total amount of cells moved to mob during compaction, in bytes.
323    */
324   long getCellsSizeCompactedToMob();
325 
326   /**
327    * Gets the total amount of cells moved from mob during compaction, in bytes.
328    */
329   long getCellsSizeCompactedFromMob();
330 
331   /**
332    * Gets the number of the flushes in mob-enabled stores.
333    */
334   long getMobFlushCount();
335 
336   /**
337    * Gets the number of mob cells flushed to disk.
338    */
339   long getMobFlushedCellsCount();
340 
341   /**
342    * Gets the total amount of mob cells flushed to disk, in bytes.
343    */
344   long getMobFlushedCellsSize();
345 
346   /**
347    * Gets the number of scanned mob cells.
348    */
349   long getMobScanCellsCount();
350 
351   /**
352    * Gets the total amount of scanned mob cells, in bytes.
353    */
354   long getMobScanCellsSize();
355 
356   /**
357    * Gets the count of accesses to the mob file cache.
358    */
359   long getMobFileCacheAccessCount();
360 
361   /**
362    * Gets the count of misses to the mob file cache.
363    */
364   long getMobFileCacheMissCount();
365 
366   /**
367    * Gets the number of items evicted from the mob file cache.
368    */
369   long getMobFileCacheEvictedCount();
370 
371   /**
372    * Gets the count of cached mob files.
373    */
374   long getMobFileCacheCount();
375 
376   /**
377    * Gets the hit percent to the mob file cache.
378    */
379   double getMobFileCacheHitPercent();
380 
381   /**
382    * @return Count of hedged read operations
383    */
384   long getHedgedReadOps();
385 
386   /**
387    * @return Count of times a hedged read beat out the primary read.
388    */
389   long getHedgedReadWins();
390 
391   /**
392    * @return Count of requests blocked because the memstore size is larger than blockingMemStoreSize
393    */
394   long getBlockedRequestsCount();
395 
396   /**
397    * Get the number of rpc get requests to this region server.
398    */
399   long getRpcGetRequestsCount();
400 
401   /**
402    * Get the number of rpc scan requests to this region server.
403    */
404   long getRpcScanRequestsCount();
405 
406   /**
407    * Get the number of rpc multi requests to this region server.
408    */
409   long getRpcMultiRequestsCount();
410 
411   /**
412    * Get the number of rpc mutate requests to this region server.
413    */
414   long getRpcMutateRequestsCount();
415 
416   /**
417    * Get the average region size to this region server.
418    */
419   long getAverageRegionSize();
420 
421   long getDataMissCount();
422 
423   long getLeafIndexMissCount();
424 
425   long getBloomChunkMissCount();
426 
427   long getMetaMissCount();
428 
429   long getRootIndexMissCount();
430 
431   long getIntermediateIndexMissCount();
432 
433   long getFileInfoMissCount();
434 
435   long getGeneralBloomMetaMissCount();
436 
437   long getDeleteFamilyBloomMissCount();
438 
439   long getTrailerMissCount();
440 
441   long getDataHitCount();
442 
443   long getLeafIndexHitCount();
444 
445   long getBloomChunkHitCount();
446 
447   long getMetaHitCount();
448 
449   long getRootIndexHitCount();
450 
451   long getIntermediateIndexHitCount();
452 
453   long getFileInfoHitCount();
454 
455   long getGeneralBloomMetaHitCount();
456 
457   long getDeleteFamilyBloomHitCount();
458 
459   long getTrailerHitCount();
460 }