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