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 getBlockCacheMissCount() { 327 return 417; 328 } 329 330 @Override 331 public long getBlockCachePrimaryMissCount() { 332 return 421; 333 } 334 335 @Override 336 public long getBlockCacheEvictedCount() { 337 return 418; 338 } 339 340 @Override 341 public long getBlockCachePrimaryEvictedCount() { 342 return 420; 343 } 344 345 @Override 346 public double getBlockCacheHitPercent() { 347 return 98; 348 } 349 350 @Override 351 public double getBlockCacheHitCachingPercent() { 352 return 97; 353 } 354 355 @Override 356 public long getBlockCacheFailedInsertions() { 357 return 36; 358 } 359 360 @Override 361 public long getL1CacheSize() { 362 return 123; 363 } 364 365 @Override 366 public long getL1CacheFreeSize() { 367 return 100; 368 } 369 370 @Override 371 public long getL1CacheCount() { 372 return 50; 373 } 374 375 @Override 376 public long getL1CacheEvictedCount() { 377 return 1000; 378 } 379 380 @Override 381 public long getL1CacheHitCount() { 382 return 200; 383 } 384 385 @Override 386 public long getL1CacheMissCount() { 387 return 100; 388 } 389 390 @Override 391 public double getL1CacheHitRatio() { 392 return 80; 393 } 394 395 @Override 396 public double getL1CacheMissRatio() { 397 return 20; 398 } 399 400 @Override 401 public long getL2CacheSize() { 402 return 456; 403 } 404 405 @Override 406 public long getL2CacheFreeSize() { 407 return 200; 408 } 409 410 @Override 411 public long getL2CacheCount() { 412 return 75; 413 } 414 415 @Override 416 public long getL2CacheEvictedCount() { 417 return 2000; 418 } 419 420 @Override 421 public long getL2CacheHitCount() { 422 return 800; 423 } 424 425 @Override 426 public long getL2CacheMissCount() { 427 return 200; 428 } 429 430 @Override 431 public double getL2CacheHitRatio() { 432 return 90; 433 } 434 435 @Override 436 public double getL2CacheMissRatio() { 437 return 10; 438 } 439 440 @Override 441 public long getUpdatesBlockedTime() { 442 return 419; 443 } 444 445 @Override 446 public void forceRecompute() { 447 // IGNORED. 448 } 449 450 @Override 451 public long getNumWALFiles() { 452 return 10; 453 } 454 455 @Override 456 public long getWALFileSize() { 457 return 1024000; 458 } 459 460 @Override 461 public List<String> getWALExcludeDNs() { 462 return Collections.emptyList(); 463 } 464 465 @Override 466 public long getNumWALSlowAppend() { 467 return 0; 468 } 469 470 @Override 471 public long getFlushedCellsCount() { 472 return 100000000; 473 } 474 475 @Override 476 public long getCompactedCellsCount() { 477 return 10000000; 478 } 479 480 @Override 481 public long getMajorCompactedCellsCount() { 482 return 1000000; 483 } 484 485 @Override 486 public long getFlushedCellsSize() { 487 return 1024000000; 488 } 489 490 @Override 491 public long getCompactedCellsSize() { 492 return 102400000; 493 } 494 495 @Override 496 public long getMajorCompactedCellsSize() { 497 return 10240000; 498 } 499 500 @Override 501 public long getHedgedReadOps() { 502 return 100; 503 } 504 505 @Override 506 public long getHedgedReadWins() { 507 return 10; 508 } 509 510 @Override 511 public long getHedgedReadOpsInCurThread() { 512 return 5; 513 } 514 515 @Override 516 public long getTotalBytesRead() { 517 return 0; 518 } 519 520 @Override 521 public long getLocalBytesRead() { 522 return 0; 523 } 524 525 @Override 526 public long getShortCircuitBytesRead() { 527 return 0; 528 } 529 530 @Override 531 public long getZeroCopyBytesRead() { 532 return 0; 533 } 534 535 @Override 536 public long getBlockedRequestsCount() { 537 return 0; 538 } 539 540 @Override 541 public long getDataMissCount() { 542 return 0; 543 } 544 545 @Override 546 public long getLeafIndexMissCount() { 547 return 0; 548 } 549 550 @Override 551 public long getBloomChunkMissCount() { 552 return 0; 553 } 554 555 @Override 556 public long getMetaMissCount() { 557 return 0; 558 } 559 560 @Override 561 public long getRootIndexMissCount() { 562 return 0; 563 } 564 565 @Override 566 public long getIntermediateIndexMissCount() { 567 return 0; 568 } 569 570 @Override 571 public long getFileInfoMissCount() { 572 return 0; 573 } 574 575 @Override 576 public long getGeneralBloomMetaMissCount() { 577 return 0; 578 } 579 580 @Override 581 public long getDeleteFamilyBloomMissCount() { 582 return 0; 583 } 584 585 @Override 586 public long getTrailerMissCount() { 587 return 0; 588 } 589 590 @Override 591 public long getDataHitCount() { 592 return 0; 593 } 594 595 @Override 596 public long getLeafIndexHitCount() { 597 return 0; 598 } 599 600 @Override 601 public long getBloomChunkHitCount() { 602 return 0; 603 } 604 605 @Override 606 public long getMetaHitCount() { 607 return 0; 608 } 609 610 @Override 611 public long getRootIndexHitCount() { 612 return 0; 613 } 614 615 @Override 616 public long getIntermediateIndexHitCount() { 617 return 0; 618 } 619 620 @Override 621 public long getFileInfoHitCount() { 622 return 0; 623 } 624 625 @Override 626 public long getGeneralBloomMetaHitCount() { 627 return 0; 628 } 629 630 @Override 631 public long getDeleteFamilyBloomHitCount() { 632 return 0; 633 } 634 635 @Override 636 public long getTrailerHitCount() { 637 return 0; 638 } 639 640 @Override 641 public int getSplitQueueSize() { 642 return 0; 643 } 644 645 @Override 646 public long getCellsCountCompactedToMob() { 647 return 20; 648 } 649 650 @Override 651 public long getCellsCountCompactedFromMob() { 652 return 10; 653 } 654 655 @Override 656 public long getCellsSizeCompactedToMob() { 657 return 200; 658 } 659 660 @Override 661 public long getCellsSizeCompactedFromMob() { 662 return 100; 663 } 664 665 @Override 666 public long getMobFlushCount() { 667 return 1; 668 } 669 670 @Override 671 public long getMobFlushedCellsCount() { 672 return 10; 673 } 674 675 @Override 676 public long getMobFlushedCellsSize() { 677 return 1000; 678 } 679 680 @Override 681 public long getMobScanCellsCount() { 682 return 10; 683 } 684 685 @Override 686 public long getMobScanCellsSize() { 687 return 1000; 688 } 689 690 @Override 691 public long getMobFileCacheAccessCount() { 692 return 100; 693 } 694 695 @Override 696 public long getMobFileCacheMissCount() { 697 return 50; 698 } 699 700 @Override 701 public long getMobFileCacheEvictedCount() { 702 return 0; 703 } 704 705 @Override 706 public long getMobFileCacheCount() { 707 return 100; 708 } 709 710 @Override 711 public double getMobFileCacheHitPercent() { 712 return 50; 713 } 714 715 @Override 716 public long getAverageRegionSize() { 717 return 10000000; 718 } 719 720 @Override 721 public long getRpcFullScanRequestsCount() { 722 return 10; 723 } 724}