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.ipc; 019 020import org.apache.hadoop.hbase.util.Pair; 021 022public class MetricsHBaseServerWrapperStub implements MetricsHBaseServerWrapper { 023 @Override 024 public long getTotalQueueSize() { 025 return 101; 026 } 027 028 @Override 029 public int getGeneralQueueLength() { 030 return 102; 031 } 032 033 @Override 034 public int getReplicationQueueLength() { 035 return 103; 036 } 037 038 @Override 039 public int getBulkLoadQueueLength() { 040 return 109; 041 } 042 043 @Override 044 public int getPriorityQueueLength() { 045 return 104; 046 } 047 048 @Override 049 public int getNumOpenConnections() { 050 return 105; 051 } 052 053 @Override 054 public int getActiveRpcHandlerCount() { 055 return 106; 056 } 057 058 @Override 059 public int getActiveGeneralRpcHandlerCount() { 060 return 201; 061 } 062 063 @Override 064 public int getActivePriorityRpcHandlerCount() { 065 return 202; 066 } 067 068 @Override 069 public int getActiveReplicationRpcHandlerCount() { 070 return 203; 071 } 072 073 @Override 074 public int getActiveBulkLoadRpcHandlerCount() { 075 return 204; 076 } 077 078 @Override 079 public long getNumGeneralCallsDropped() { 080 return 3; 081 } 082 083 @Override 084 public long getNumLifoModeSwitches() { 085 return 5; 086 } 087 088 @Override 089 public int getWriteQueueLength() { 090 return 50; 091 } 092 093 @Override 094 public int getReadQueueLength() { 095 return 50; 096 } 097 098 @Override 099 public int getScanQueueLength() { 100 return 2; 101 } 102 103 @Override 104 public int getActiveWriteRpcHandlerCount() { 105 return 50; 106 } 107 108 @Override 109 public int getActiveReadRpcHandlerCount() { 110 return 50; 111 } 112 113 @Override 114 public int getActiveScanRpcHandlerCount() { 115 return 6; 116 } 117 118 @Override 119 public long getNettyDmUsage() { 120 return 100L; 121 } 122 123 @Override 124 public int getMetaPriorityQueueLength() { 125 return 1; 126 } 127 128 @Override 129 public int getActiveMetaPriorityRpcHandlerCount() { 130 return 1; 131 } 132 133 @Override 134 public Pair<Long, Long> getTotalAndMaxNettyOutboundBytes() { 135 return Pair.newPair(100L, 5L); 136 } 137}