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 public long getNumWALFiles();
74
75 /**
76 * Get the size of WAL files of this region server.
77 */
78 public long getWALFileSize();
79
80 /**
81 * Get the number of store files hosted on this region server.
82 */
83 long getNumStoreFiles();
84
85 /**
86 * Get the size of the memstore on this region server.
87 */
88 long getMemstoreSize();
89
90 /**
91 * Get the total size of the store files this region server is serving from.
92 */
93 long getStoreFileSize();
94
95 /**
96 * @return Max age of store files hosted on this region server
97 */
98 long getMaxStoreFileAge();
99
100 /**
101 * @return Min age of store files hosted on this region server
102 */
103 long getMinStoreFileAge();
104
105 /**
106 * @return Average age of store files hosted on this region server
107 */
108 long getAvgStoreFileAge();
109
110 /**
111 * @return Number of reference files on this region server
112 */
113 long getNumReferenceFiles();
114
115 /**
116 * Get the number of requests per second.
117 */
118 double getRequestsPerSecond();
119
120 /**
121 * Get the total number of requests per second.
122 */
123 long getTotalRequestCount();
124
125 /**
126 * Get the number of read requests to regions hosted on this region server.
127 */
128 long getReadRequestsCount();
129
130 /**
131 * Get the number of write requests to regions hosted on this region server.
132 */
133 long getWriteRequestsCount();
134
135 /**
136 * Get the number of CAS operations that failed.
137 */
138 long getCheckAndMutateChecksFailed();
139
140 /**
141 * Get the number of CAS operations that passed.
142 */
143 long getCheckAndMutateChecksPassed();
144
145 /**
146 * Get the Size (in bytes) of indexes in storefiles on disk.
147 */
148 long getStoreFileIndexSize();
149
150 /**
151 * Get the size (in bytes) of of the static indexes including the roots.
152 */
153 long getTotalStaticIndexSize();
154
155 /**
156 * Get the size (in bytes) of the static bloom filters.
157 */
158 long getTotalStaticBloomSize();
159
160 /**
161 * Number of mutations received with WAL explicitly turned off.
162 */
163 long getNumMutationsWithoutWAL();
164
165 /**
166 * Ammount of data in the memstore but not in the WAL because mutations explicitly had their
167 * WAL turned off.
168 */
169 long getDataInMemoryWithoutWAL();
170
171 /**
172 * Get the percent of HFiles' that are local.
173 */
174 double getPercentFileLocal();
175
176 /**
177 * Get the percent of HFiles' that are local for secondary region replicas.
178 */
179 double getPercentFileLocalSecondaryRegions();
180
181 /**
182 * Get the size of the split queue
183 */
184 int getSplitQueueSize();
185
186 /**
187 * Get the size of the compaction queue
188 */
189 int getCompactionQueueSize();
190
191 int getSmallCompactionQueueSize();
192
193 int getLargeCompactionQueueSize();
194
195 /**
196 * Get the size of the flush queue.
197 */
198 int getFlushQueueSize();
199
200 /**
201 * Get the size (in bytes) of the block cache that is free.
202 */
203 long getBlockCacheFreeSize();
204
205 /**
206 * Get the number of items in the block cache.
207 */
208 long getBlockCacheCount();
209
210 /**
211 * Get the total size (in bytes) of the block cache.
212 */
213 long getBlockCacheSize();
214
215 /**
216 * Get the count of hits to the block cache
217 */
218 long getBlockCacheHitCount();
219
220 /**
221 * Get the count of hits to primary replica in the block cache
222 */
223 long getBlockCachePrimaryHitCount();
224
225 /**
226 * Get the count of misses to the block cache.
227 */
228 long getBlockCacheMissCount();
229
230 /**
231 * Get the count of misses to primary replica in the block cache.
232 */
233 long getBlockCachePrimaryMissCount();
234
235 /**
236 * Get the number of items evicted from the block cache.
237 */
238 long getBlockCacheEvictedCount();
239
240 /**
241 * Get the number of items evicted from primary replica in the block cache.
242 */
243 long getBlockCachePrimaryEvictedCount();
244
245
246 /**
247 * Get the percent of all requests that hit the block cache.
248 */
249 double getBlockCacheHitPercent();
250
251 /**
252 * Get the percent of requests with the block cache turned on that hit the block cache.
253 */
254 double getBlockCacheHitCachingPercent();
255
256 /**
257 * Force a re-computation of the metrics.
258 */
259 void forceRecompute();
260
261 /**
262 * Get the amount of time that updates were blocked.
263 */
264 long getUpdatesBlockedTime();
265
266 /**
267 * Get the number of cells flushed to disk.
268 */
269 long getFlushedCellsCount();
270
271 /**
272 * Get the number of cells processed during minor compactions.
273 */
274 long getCompactedCellsCount();
275
276 /**
277 * Get the number of cells processed during major compactions.
278 */
279 long getMajorCompactedCellsCount();
280
281 /**
282 * Gets the number of cells moved to mob during compaction.
283 */
284 long getCellsCountCompactedToMob();
285
286 /**
287 * Gets the number of cells moved from mob during compaction.
288 */
289 long getCellsCountCompactedFromMob();
290
291 /**
292 * Gets the total amount of cells moved to mob during compaction, in bytes.
293 */
294 long getCellsSizeCompactedToMob();
295
296 /**
297 * Gets the total amount of cells moved from mob during compaction, in bytes.
298 */
299 long getCellsSizeCompactedFromMob();
300
301 /**
302 * Gets the number of the flushes in mob-enabled stores.
303 */
304 long getMobFlushCount();
305
306 /**
307 * Gets the number of mob cells flushed to disk.
308 */
309 long getMobFlushedCellsCount();
310
311 /**
312 * Gets the total amount of mob cells flushed to disk, in bytes.
313 */
314 long getMobFlushedCellsSize();
315
316 /**
317 * Gets the number of scanned mob cells.
318 */
319 long getMobScanCellsCount();
320 /**
321 * Gets the total amount of scanned mob cells, in bytes.
322 */
323 long getMobScanCellsSize();
324
325 /**
326 * Gets the count of accesses to the mob file cache.
327 */
328 long getMobFileCacheAccessCount();
329
330 /**
331 * Gets the count of misses to the mob file cache.
332 */
333 long getMobFileCacheMissCount();
334
335 /**
336 * Gets the number of items evicted from the mob file cache.
337 */
338 long getMobFileCacheEvictedCount();
339
340 /**
341 * Gets the count of cached mob files.
342 */
343 long getMobFileCacheCount();
344
345 /**
346 * Gets the hit percent to the mob file cache.
347 */
348 int getMobFileCacheHitPercent();
349
350 /**
351 * Get the total amount of data flushed to disk, in bytes.
352 */
353 long getFlushedCellsSize();
354
355 /**
356 * Get the total amount of data processed during minor compactions, in bytes.
357 */
358 long getCompactedCellsSize();
359
360 /**
361 * Get the total amount of data processed during major compactions, in bytes.
362 */
363 long getMajorCompactedCellsSize();
364
365 /**
366 * @return Count of requests blocked because the memstore size is larger than blockingMemStoreSize
367 */
368 long getBlockedRequestsCount();
369
370 /**
371 * Get the number of rpc get requests to this region server.
372 */
373 long getRpcGetRequestsCount();
374
375 /**
376 * Get the number of rpc scan requests to this region server.
377 */
378 long getRpcScanRequestsCount();
379
380 /**
381 * Get the number of rpc multi requests to this region server.
382 */
383 long getRpcMultiRequestsCount();
384
385 /**
386 * Get the number of rpc mutate requests to this region server.
387 */
388 long getRpcMutateRequestsCount();
389
390 /**
391 * Get the average region size to this region server.
392 */
393 long getAverageRegionSize();
394
395 long getDataMissCount();
396
397 long getLeafIndexMissCount();
398
399 long getBloomChunkMissCount();
400
401 long getMetaMissCount();
402
403 long getRootIndexMissCount();
404
405 long getIntermediateIndexMissCount();
406
407 long getFileInfoMissCount();
408
409 long getGeneralBloomMetaMissCount();
410
411 long getDeleteFamilyBloomMissCount();
412
413 long getTrailerMissCount();
414
415 long getDataHitCount();
416
417 long getLeafIndexHitCount();
418
419 long getBloomChunkHitCount();
420
421 long getMetaHitCount();
422
423 long getRootIndexHitCount();
424
425 long getIntermediateIndexHitCount();
426
427 long getFileInfoHitCount();
428
429 long getGeneralBloomMetaHitCount();
430
431 long getDeleteFamilyBloomHitCount();
432
433 long getTrailerHitCount();
434 }