001/*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018package org.apache.hadoop.hbase.regionserver;
019
020import java.util.Collections;
021import java.util.List;
022
023public class MetricsRegionServerWrapperStub implements MetricsRegionServerWrapper {
024
025  @Override
026  public String getServerName() {
027    return "test";
028  }
029
030  @Override
031  public String getClusterId() {
032    return "tClusterId";
033  }
034
035  @Override
036  public String getZookeeperQuorum() {
037    return "zk";
038  }
039
040  @Override
041  public String getCoprocessors() {
042    return "co-process";
043  }
044
045  @Override
046  public long getStartCode() {
047    return 100;
048  }
049
050  @Override
051  public long getNumOnlineRegions() {
052    return 101;
053  }
054
055  @Override
056  public long getNumStores() {
057    return 2;
058  }
059
060  @Override
061  public long getNumStoreFiles() {
062    return 300;
063  }
064
065  @Override
066  public long getMemStoreSize() {
067    return 1025;
068  }
069
070  @Override
071  public long getOnHeapMemStoreSize() {
072    return 500;
073  }
074
075  @Override
076  public long getOffHeapMemStoreSize() {
077    return 600;
078  }
079
080  @Override
081  public long getStoreFileSize() {
082    return 1900;
083  }
084
085  @Override
086  public double getStoreFileSizeGrowthRate() {
087    return 50.0;
088  }
089
090  @Override
091  public long getMaxStoreFileAge() {
092    return 2;
093  }
094
095  @Override
096  public long getMinStoreFileAge() {
097    return 2;
098  }
099
100  @Override
101  public long getAvgStoreFileAge() {
102    return 2;
103  }
104
105  @Override
106  public long getNumReferenceFiles() {
107    return 2;
108  }
109
110  @Override
111  public double getRequestsPerSecond() {
112    return 0;
113  }
114
115  @Override
116  public long getTotalRequestCount() {
117    return 899;
118  }
119
120  @Override
121  public double getReadRequestsRatePerSecond() {
122    return 10.0;
123  }
124
125  @Override
126  public long getTotalRowActionRequestCount() {
127    return getReadRequestsCount() + getWriteRequestsCount();
128  }
129
130  @Override
131  public long getByteBuffAllocatorHeapAllocationBytes() {
132    return 0;
133  }
134
135  @Override
136  public long getByteBuffAllocatorPoolAllocationBytes() {
137    return 0;
138  }
139
140  @Override
141  public double getByteBuffAllocatorHeapAllocRatio() {
142    return 0;
143  }
144
145  @Override
146  public long getByteBuffAllocatorTotalBufferCount() {
147    return 0;
148  }
149
150  @Override
151  public long getByteBuffAllocatorUsedBufferCount() {
152    return 0;
153  }
154
155  @Override
156  public int getActiveScanners() {
157    return 0;
158  }
159
160  @Override
161  public long getReadRequestsCount() {
162    return 997;
163  }
164
165  @Override
166  public long getCpRequestsCount() {
167    return 998;
168  }
169
170  @Override
171  public long getFilteredReadRequestsCount() {
172    return 1997;
173  }
174
175  @Override
176  public long getWriteRequestsCount() {
177    return 707;
178  }
179
180  @Override
181  public double getWriteRequestsRatePerSecond() {
182    return 10.0;
183  }
184
185  @Override
186  public long getRpcGetRequestsCount() {
187    return 521;
188  }
189
190  @Override
191  public long getRpcScanRequestsCount() {
192    return 101;
193  }
194
195  @Override
196  public long getRpcMultiRequestsCount() {
197    return 486;
198  }
199
200  @Override
201  public long getRpcMutateRequestsCount() {
202    return 606;
203  }
204
205  @Override
206  public long getCheckAndMutateChecksFailed() {
207    return 401;
208  }
209
210  @Override
211  public long getCheckAndMutateChecksPassed() {
212    return 405;
213  }
214
215  @Override
216  public long getStoreFileIndexSize() {
217    return 406;
218  }
219
220  @Override
221  public long getTotalStaticIndexSize() {
222    return 407;
223  }
224
225  @Override
226  public long getTotalStaticBloomSize() {
227    return 408;
228  }
229
230  @Override
231  public long getNumMutationsWithoutWAL() {
232    return 409;
233  }
234
235  @Override
236  public long getDataInMemoryWithoutWAL() {
237    return 410;
238  }
239
240  @Override
241  public double getPercentFileLocal() {
242    return 99;
243  }
244
245  @Override
246  public double getPercentFileLocalSecondaryRegions() {
247    return 99;
248  }
249
250  @Override
251  public int getCompactionQueueSize() {
252    return 411;
253  }
254
255  @Override
256  public int getSmallCompactionQueueSize() {
257    return 0;
258  }
259
260  @Override
261  public int getLargeCompactionQueueSize() {
262    return 0;
263  }
264
265  @Override
266  public int getFlushQueueSize() {
267    return 412;
268  }
269
270  @Override
271  public long getMemStoreLimit() {
272    return 419;
273  }
274
275  @Override
276  public long getOnHeapMemStoreLimit() {
277    return 311;
278  }
279
280  @Override
281  public long getOffHeapMemStoreLimit() {
282    return 419;
283  }
284
285  @Override
286  public long getBlockCacheFreeSize() {
287    return 413;
288  }
289
290  @Override
291  public long getBlockCacheCount() {
292    return 414;
293  }
294
295  @Override
296  public long getBlockCacheSize() {
297    return 415;
298  }
299
300  @Override
301  public long getBlockCacheHitCount() {
302    return 416;
303  }
304
305  @Override
306  public long getBlockCachePrimaryHitCount() {
307    return 422;
308  }
309
310  @Override
311  public long getBlockCacheMissCount() {
312    return 417;
313  }
314
315  @Override
316  public long getBlockCachePrimaryMissCount() {
317    return 421;
318  }
319
320  @Override
321  public long getBlockCacheEvictedCount() {
322    return 418;
323  }
324
325  @Override
326  public long getBlockCachePrimaryEvictedCount() {
327    return 420;
328  }
329
330  @Override
331  public double getBlockCacheHitPercent() {
332    return 98;
333  }
334
335  @Override
336  public double getBlockCacheHitCachingPercent() {
337    return 97;
338  }
339
340  @Override
341  public long getBlockCacheFailedInsertions() {
342    return 36;
343  }
344
345  @Override
346  public long getL1CacheHitCount() {
347    return 200;
348  }
349
350  @Override
351  public long getL1CacheMissCount() {
352    return 100;
353  }
354
355  @Override
356  public double getL1CacheHitRatio() {
357    return 80;
358  }
359
360  @Override
361  public double getL1CacheMissRatio() {
362    return 20;
363  }
364
365  @Override
366  public long getL2CacheHitCount() {
367    return 800;
368  }
369
370  @Override
371  public long getL2CacheMissCount() {
372    return 200;
373  }
374
375  @Override
376  public double getL2CacheHitRatio() {
377    return 90;
378  }
379
380  @Override
381  public double getL2CacheMissRatio() {
382    return 10;
383  }
384
385  @Override
386  public long getUpdatesBlockedTime() {
387    return 419;
388  }
389
390  @Override
391  public void forceRecompute() {
392    // IGNORED.
393  }
394
395  @Override
396  public long getNumWALFiles() {
397    return 10;
398  }
399
400  @Override
401  public long getWALFileSize() {
402    return 1024000;
403  }
404
405  @Override
406  public List<String> getWALExcludeDNs() {
407    return Collections.emptyList();
408  }
409
410  @Override
411  public long getNumWALSlowAppend() {
412    return 0;
413  }
414
415  @Override
416  public long getFlushedCellsCount() {
417    return 100000000;
418  }
419
420  @Override
421  public long getCompactedCellsCount() {
422    return 10000000;
423  }
424
425  @Override
426  public long getMajorCompactedCellsCount() {
427    return 1000000;
428  }
429
430  @Override
431  public long getFlushedCellsSize() {
432    return 1024000000;
433  }
434
435  @Override
436  public long getCompactedCellsSize() {
437    return 102400000;
438  }
439
440  @Override
441  public long getMajorCompactedCellsSize() {
442    return 10240000;
443  }
444
445  @Override
446  public long getHedgedReadOps() {
447    return 100;
448  }
449
450  @Override
451  public long getHedgedReadWins() {
452    return 10;
453  }
454
455  @Override
456  public long getHedgedReadOpsInCurThread() {
457    return 5;
458  }
459
460  @Override
461  public long getTotalBytesRead() {
462    return 0;
463  }
464
465  @Override
466  public long getLocalBytesRead() {
467    return 0;
468  }
469
470  @Override
471  public long getShortCircuitBytesRead() {
472    return 0;
473  }
474
475  @Override
476  public long getZeroCopyBytesRead() {
477    return 0;
478  }
479
480  @Override
481  public long getBlockedRequestsCount() {
482    return 0;
483  }
484
485  @Override
486  public long getDataMissCount() {
487    return 0;
488  }
489
490  @Override
491  public long getLeafIndexMissCount() {
492    return 0;
493  }
494
495  @Override
496  public long getBloomChunkMissCount() {
497    return 0;
498  }
499
500  @Override
501  public long getMetaMissCount() {
502    return 0;
503  }
504
505  @Override
506  public long getRootIndexMissCount() {
507    return 0;
508  }
509
510  @Override
511  public long getIntermediateIndexMissCount() {
512    return 0;
513  }
514
515  @Override
516  public long getFileInfoMissCount() {
517    return 0;
518  }
519
520  @Override
521  public long getGeneralBloomMetaMissCount() {
522    return 0;
523  }
524
525  @Override
526  public long getDeleteFamilyBloomMissCount() {
527    return 0;
528  }
529
530  @Override
531  public long getTrailerMissCount() {
532    return 0;
533  }
534
535  @Override
536  public long getDataHitCount() {
537    return 0;
538  }
539
540  @Override
541  public long getLeafIndexHitCount() {
542    return 0;
543  }
544
545  @Override
546  public long getBloomChunkHitCount() {
547    return 0;
548  }
549
550  @Override
551  public long getMetaHitCount() {
552    return 0;
553  }
554
555  @Override
556  public long getRootIndexHitCount() {
557    return 0;
558  }
559
560  @Override
561  public long getIntermediateIndexHitCount() {
562    return 0;
563  }
564
565  @Override
566  public long getFileInfoHitCount() {
567    return 0;
568  }
569
570  @Override
571  public long getGeneralBloomMetaHitCount() {
572    return 0;
573  }
574
575  @Override
576  public long getDeleteFamilyBloomHitCount() {
577    return 0;
578  }
579
580  @Override
581  public long getTrailerHitCount() {
582    return 0;
583  }
584
585  @Override
586  public int getSplitQueueSize() {
587    return 0;
588  }
589
590  @Override
591  public long getCellsCountCompactedToMob() {
592    return 20;
593  }
594
595  @Override
596  public long getCellsCountCompactedFromMob() {
597    return 10;
598  }
599
600  @Override
601  public long getCellsSizeCompactedToMob() {
602    return 200;
603  }
604
605  @Override
606  public long getCellsSizeCompactedFromMob() {
607    return 100;
608  }
609
610  @Override
611  public long getMobFlushCount() {
612    return 1;
613  }
614
615  @Override
616  public long getMobFlushedCellsCount() {
617    return 10;
618  }
619
620  @Override
621  public long getMobFlushedCellsSize() {
622    return 1000;
623  }
624
625  @Override
626  public long getMobScanCellsCount() {
627    return 10;
628  }
629
630  @Override
631  public long getMobScanCellsSize() {
632    return 1000;
633  }
634
635  @Override
636  public long getMobFileCacheAccessCount() {
637    return 100;
638  }
639
640  @Override
641  public long getMobFileCacheMissCount() {
642    return 50;
643  }
644
645  @Override
646  public long getMobFileCacheEvictedCount() {
647    return 0;
648  }
649
650  @Override
651  public long getMobFileCacheCount() {
652    return 100;
653  }
654
655  @Override
656  public double getMobFileCacheHitPercent() {
657    return 50;
658  }
659
660  @Override
661  public long getAverageRegionSize() {
662    return 10000000;
663  }
664
665  @Override
666  public long getRpcFullScanRequestsCount() {
667    return 10;
668  }
669}