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 getMaxStoreFiles() { 067 return 23; 068 } 069 070 @Override 071 public long getMemStoreSize() { 072 return 1025; 073 } 074 075 @Override 076 public long getOnHeapMemStoreSize() { 077 return 500; 078 } 079 080 @Override 081 public long getOffHeapMemStoreSize() { 082 return 600; 083 } 084 085 @Override 086 public long getStoreFileSize() { 087 return 1900; 088 } 089 090 @Override 091 public double getStoreFileSizeGrowthRate() { 092 return 50.0; 093 } 094 095 @Override 096 public long getMaxStoreFileAge() { 097 return 2; 098 } 099 100 @Override 101 public long getMinStoreFileAge() { 102 return 2; 103 } 104 105 @Override 106 public long getAvgStoreFileAge() { 107 return 2; 108 } 109 110 @Override 111 public long getNumReferenceFiles() { 112 return 2; 113 } 114 115 @Override 116 public double getRequestsPerSecond() { 117 return 0; 118 } 119 120 @Override 121 public long getTotalRequestCount() { 122 return 899; 123 } 124 125 @Override 126 public double getReadRequestsRatePerSecond() { 127 return 10.0; 128 } 129 130 @Override 131 public long getTotalRowActionRequestCount() { 132 return getReadRequestsCount() + getWriteRequestsCount(); 133 } 134 135 @Override 136 public long getByteBuffAllocatorHeapAllocationBytes() { 137 return 0; 138 } 139 140 @Override 141 public long getByteBuffAllocatorPoolAllocationBytes() { 142 return 0; 143 } 144 145 @Override 146 public double getByteBuffAllocatorHeapAllocRatio() { 147 return 0; 148 } 149 150 @Override 151 public long getByteBuffAllocatorTotalBufferCount() { 152 return 0; 153 } 154 155 @Override 156 public long getByteBuffAllocatorUsedBufferCount() { 157 return 0; 158 } 159 160 @Override 161 public int getActiveScanners() { 162 return 0; 163 } 164 165 @Override 166 public long getReadRequestsCount() { 167 return 997; 168 } 169 170 @Override 171 public long getCpRequestsCount() { 172 return 998; 173 } 174 175 @Override 176 public long getFilteredReadRequestsCount() { 177 return 1997; 178 } 179 180 @Override 181 public long getWriteRequestsCount() { 182 return 707; 183 } 184 185 @Override 186 public double getWriteRequestsRatePerSecond() { 187 return 10.0; 188 } 189 190 @Override 191 public long getRpcGetRequestsCount() { 192 return 521; 193 } 194 195 @Override 196 public long getRpcScanRequestsCount() { 197 return 101; 198 } 199 200 @Override 201 public long getRpcMultiRequestsCount() { 202 return 486; 203 } 204 205 @Override 206 public long getRpcMutateRequestsCount() { 207 return 606; 208 } 209 210 @Override 211 public long getCheckAndMutateChecksFailed() { 212 return 401; 213 } 214 215 @Override 216 public long getCheckAndMutateChecksPassed() { 217 return 405; 218 } 219 220 @Override 221 public long getStoreFileIndexSize() { 222 return 406; 223 } 224 225 @Override 226 public long getTotalStaticIndexSize() { 227 return 407; 228 } 229 230 @Override 231 public long getTotalStaticBloomSize() { 232 return 408; 233 } 234 235 @Override 236 public long getNumMutationsWithoutWAL() { 237 return 409; 238 } 239 240 @Override 241 public long getDataInMemoryWithoutWAL() { 242 return 410; 243 } 244 245 @Override 246 public long getBloomFilterRequestsCount() { 247 return 411; 248 } 249 250 @Override 251 public long getBloomFilterNegativeResultsCount() { 252 return 412; 253 } 254 255 @Override 256 public long getBloomFilterEligibleRequestsCount() { 257 return 413; 258 } 259 260 @Override 261 public double getPercentFileLocal() { 262 return 99; 263 } 264 265 @Override 266 public double getPercentFileLocalSecondaryRegions() { 267 return 99; 268 } 269 270 @Override 271 public int getCompactionQueueSize() { 272 return 411; 273 } 274 275 @Override 276 public int getSmallCompactionQueueSize() { 277 return 0; 278 } 279 280 @Override 281 public int getLargeCompactionQueueSize() { 282 return 0; 283 } 284 285 @Override 286 public int getFlushQueueSize() { 287 return 412; 288 } 289 290 @Override 291 public long getMemStoreLimit() { 292 return 419; 293 } 294 295 @Override 296 public long getOnHeapMemStoreLimit() { 297 return 311; 298 } 299 300 @Override 301 public long getOffHeapMemStoreLimit() { 302 return 419; 303 } 304 305 @Override 306 public long getBlockCacheFreeSize() { 307 return 413; 308 } 309 310 @Override 311 public long getBlockCacheCount() { 312 return 414; 313 } 314 315 @Override 316 public long getBlockCacheDataBlockCount() { 317 return 300; 318 } 319 320 @Override 321 public long getBlockCacheSize() { 322 return 415; 323 } 324 325 @Override 326 public long getBlockCacheHitCount() { 327 return 416; 328 } 329 330 @Override 331 public long getBlockCachePrimaryHitCount() { 332 return 422; 333 } 334 335 @Override 336 public long getBlockCacheHitCachingCount() { 337 return 16; 338 } 339 340 @Override 341 public long getBlockCacheMissCount() { 342 return 417; 343 } 344 345 @Override 346 public long getBlockCachePrimaryMissCount() { 347 return 421; 348 } 349 350 @Override 351 public long getBlockCacheMissCachingCount() { 352 return 17; 353 } 354 355 @Override 356 public long getBlockCacheEvictedCount() { 357 return 418; 358 } 359 360 @Override 361 public long getBlockCachePrimaryEvictedCount() { 362 return 420; 363 } 364 365 @Override 366 public double getBlockCacheHitPercent() { 367 return 98; 368 } 369 370 @Override 371 public double getBlockCacheHitCachingPercent() { 372 return 97; 373 } 374 375 @Override 376 public long getBlockCacheFailedInsertions() { 377 return 36; 378 } 379 380 @Override 381 public long getL1CacheSize() { 382 return 123; 383 } 384 385 @Override 386 public long getL1CacheFreeSize() { 387 return 100; 388 } 389 390 @Override 391 public long getL1CacheCount() { 392 return 50; 393 } 394 395 @Override 396 public long getL1CacheEvictedCount() { 397 return 1000; 398 } 399 400 @Override 401 public long getL1CacheHitCount() { 402 return 200; 403 } 404 405 @Override 406 public long getL1CacheMissCount() { 407 return 100; 408 } 409 410 @Override 411 public double getL1CacheHitRatio() { 412 return 80; 413 } 414 415 @Override 416 public double getL1CacheMissRatio() { 417 return 20; 418 } 419 420 @Override 421 public long getL2CacheSize() { 422 return 456; 423 } 424 425 @Override 426 public long getL2CacheFreeSize() { 427 return 200; 428 } 429 430 @Override 431 public long getL2CacheCount() { 432 return 75; 433 } 434 435 @Override 436 public long getL2CacheEvictedCount() { 437 return 2000; 438 } 439 440 @Override 441 public long getL2CacheHitCount() { 442 return 800; 443 } 444 445 @Override 446 public long getL2CacheMissCount() { 447 return 200; 448 } 449 450 @Override 451 public double getL2CacheHitRatio() { 452 return 90; 453 } 454 455 @Override 456 public double getL2CacheMissRatio() { 457 return 10; 458 } 459 460 @Override 461 public long getUpdatesBlockedTime() { 462 return 419; 463 } 464 465 @Override 466 public void forceRecompute() { 467 // IGNORED. 468 } 469 470 @Override 471 public long getNumWALFiles() { 472 return 10; 473 } 474 475 @Override 476 public long getWALFileSize() { 477 return 1024000; 478 } 479 480 @Override 481 public List<String> getWALExcludeDNs() { 482 return Collections.emptyList(); 483 } 484 485 @Override 486 public long getNumWALSlowAppend() { 487 return 0; 488 } 489 490 @Override 491 public long getFlushedCellsCount() { 492 return 100000000; 493 } 494 495 @Override 496 public long getCompactedCellsCount() { 497 return 10000000; 498 } 499 500 @Override 501 public long getMajorCompactedCellsCount() { 502 return 1000000; 503 } 504 505 @Override 506 public long getFlushedCellsSize() { 507 return 1024000000; 508 } 509 510 @Override 511 public long getCompactedCellsSize() { 512 return 102400000; 513 } 514 515 @Override 516 public long getMajorCompactedCellsSize() { 517 return 10240000; 518 } 519 520 @Override 521 public long getHedgedReadOps() { 522 return 100; 523 } 524 525 @Override 526 public long getHedgedReadWins() { 527 return 10; 528 } 529 530 @Override 531 public long getHedgedReadOpsInCurThread() { 532 return 5; 533 } 534 535 @Override 536 public long getTotalBytesRead() { 537 return 0; 538 } 539 540 @Override 541 public long getLocalBytesRead() { 542 return 0; 543 } 544 545 @Override 546 public long getShortCircuitBytesRead() { 547 return 0; 548 } 549 550 @Override 551 public long getZeroCopyBytesRead() { 552 return 0; 553 } 554 555 @Override 556 public long getBlockedRequestsCount() { 557 return 0; 558 } 559 560 @Override 561 public long getDataMissCount() { 562 return 0; 563 } 564 565 @Override 566 public long getLeafIndexMissCount() { 567 return 0; 568 } 569 570 @Override 571 public long getBloomChunkMissCount() { 572 return 0; 573 } 574 575 @Override 576 public long getMetaMissCount() { 577 return 0; 578 } 579 580 @Override 581 public long getRootIndexMissCount() { 582 return 0; 583 } 584 585 @Override 586 public long getIntermediateIndexMissCount() { 587 return 0; 588 } 589 590 @Override 591 public long getFileInfoMissCount() { 592 return 0; 593 } 594 595 @Override 596 public long getGeneralBloomMetaMissCount() { 597 return 0; 598 } 599 600 @Override 601 public long getDeleteFamilyBloomMissCount() { 602 return 0; 603 } 604 605 @Override 606 public long getTrailerMissCount() { 607 return 0; 608 } 609 610 @Override 611 public long getDataHitCount() { 612 return 0; 613 } 614 615 @Override 616 public long getLeafIndexHitCount() { 617 return 0; 618 } 619 620 @Override 621 public long getBloomChunkHitCount() { 622 return 0; 623 } 624 625 @Override 626 public long getMetaHitCount() { 627 return 0; 628 } 629 630 @Override 631 public long getRootIndexHitCount() { 632 return 0; 633 } 634 635 @Override 636 public long getIntermediateIndexHitCount() { 637 return 0; 638 } 639 640 @Override 641 public long getFileInfoHitCount() { 642 return 0; 643 } 644 645 @Override 646 public long getGeneralBloomMetaHitCount() { 647 return 0; 648 } 649 650 @Override 651 public long getDeleteFamilyBloomHitCount() { 652 return 0; 653 } 654 655 @Override 656 public long getTrailerHitCount() { 657 return 0; 658 } 659 660 @Override 661 public int getSplitQueueSize() { 662 return 0; 663 } 664 665 @Override 666 public long getCellsCountCompactedToMob() { 667 return 20; 668 } 669 670 @Override 671 public long getCellsCountCompactedFromMob() { 672 return 10; 673 } 674 675 @Override 676 public long getCellsSizeCompactedToMob() { 677 return 200; 678 } 679 680 @Override 681 public long getCellsSizeCompactedFromMob() { 682 return 100; 683 } 684 685 @Override 686 public long getMobFlushCount() { 687 return 1; 688 } 689 690 @Override 691 public long getMobFlushedCellsCount() { 692 return 10; 693 } 694 695 @Override 696 public long getMobFlushedCellsSize() { 697 return 1000; 698 } 699 700 @Override 701 public long getMobScanCellsCount() { 702 return 10; 703 } 704 705 @Override 706 public long getMobScanCellsSize() { 707 return 1000; 708 } 709 710 @Override 711 public long getMobFileCacheAccessCount() { 712 return 100; 713 } 714 715 @Override 716 public long getMobFileCacheMissCount() { 717 return 50; 718 } 719 720 @Override 721 public long getMobFileCacheEvictedCount() { 722 return 0; 723 } 724 725 @Override 726 public long getMobFileCacheCount() { 727 return 100; 728 } 729 730 @Override 731 public double getMobFileCacheHitPercent() { 732 return 50; 733 } 734 735 @Override 736 public long getAverageRegionSize() { 737 return 10000000; 738 } 739 740 @Override 741 public long getRpcFullScanRequestsCount() { 742 return 10; 743 } 744}