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