1 /**
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19 package org.apache.hadoop.hbase.regionserver;
20
21 /**
22 * This is the interface that will expose RegionServer information to hadoop1/hadoop2
23 * implementations of the MetricsRegionServerSource.
24 */
25 public interface MetricsRegionServerWrapper {
26
27 /**
28 * Get ServerName
29 */
30 String getServerName();
31
32 /**
33 * Get the Cluster ID
34 *
35 * @return Cluster ID
36 */
37 String getClusterId();
38
39 /**
40 * Get the Zookeeper Quorum Info
41 *
42 * @return Zookeeper Quorum Info
43 */
44 String getZookeeperQuorum();
45
46 /**
47 * Get the co-processors
48 *
49 * @return Co-processors
50 */
51 String getCoprocessors();
52
53 /**
54 * Get HRegionServer start time
55 *
56 * @return Start time of RegionServer in milliseconds
57 */
58 long getStartCode();
59
60 /**
61 * The number of online regions
62 */
63 long getNumOnlineRegions();
64
65 /**
66 * Get the number of stores hosted on this region server.
67 */
68 long getNumStores();
69
70 /**
71 * Get the number of store files hosted on this region server.
72 */
73 long getNumStoreFiles();
74
75 /**
76 * Get the size of the memstore on this region server.
77 */
78 long getMemstoreSize();
79
80 /**
81 * Get the total size of the store files this region server is serving from.
82 */
83 long getStoreFileSize();
84
85 /**
86 * Get the number of requests per second.
87 */
88 double getRequestsPerSecond();
89
90 /**
91 * Get the total number of requests per second.
92 */
93 long getTotalRequestCount();
94
95 /**
96 * Get the number of read requests to regions hosted on this region server.
97 */
98 long getReadRequestsCount();
99
100 /**
101 * Get the number of write requests to regions hosted on this region server.
102 */
103 long getWriteRequestsCount();
104
105 /**
106 * Get the number of CAS operations that failed.
107 */
108 long getCheckAndMutateChecksFailed();
109
110 /**
111 * Get the number of CAS operations that passed.
112 */
113 long getCheckAndMutateChecksPassed();
114
115 /**
116 * Get the Size of indexes in storefiles on disk.
117 */
118 long getStoreFileIndexSize();
119
120 /**
121 * Get the size of of the static indexes including the roots.
122 */
123 long getTotalStaticIndexSize();
124
125 /**
126 * Get the size of the static bloom filters.
127 */
128 long getTotalStaticBloomSize();
129
130 /**
131 * Number of mutations received with WAL explicitly turned off.
132 */
133 long getNumMutationsWithoutWAL();
134
135 /**
136 * Ammount of data in the memstore but not in the WAL because mutations explicitly had their
137 * WAL turned off.
138 */
139 long getDataInMemoryWithoutWAL();
140
141 /**
142 * Get the percent of HFiles' that are local.
143 */
144 int getPercentFileLocal();
145
146 /**
147 * Get the size of the compaction queue
148 */
149 int getCompactionQueueSize();
150
151 /**
152 * Get the size of the flush queue.
153 */
154 int getFlushQueueSize();
155
156 /**
157 * Get the size of the block cache that is free.
158 */
159 long getBlockCacheFreeSize();
160
161 /**
162 * Get the number of items in the block cache.
163 */
164 long getBlockCacheCount();
165
166 /**
167 * Get the total size of the block cache.
168 */
169 long getBlockCacheSize();
170
171 /**
172 * Get the count of hits to the block cache
173 */
174 long getBlockCacheHitCount();
175
176 /**
177 * Get the count of misses to the block cache.
178 */
179 long getBlockCacheMissCount();
180
181 /**
182 * Get the number of items evicted from the block cache.
183 */
184 long getBlockCacheEvictedCount();
185
186 /**
187 * Get the percent of all requests that hit the block cache.
188 */
189 int getBlockCacheHitPercent();
190
191 /**
192 * Get the percent of requests with the block cache turned on that hit the block cache.
193 */
194 int getBlockCacheHitCachingPercent();
195
196 /**
197 * Force a re-computation of the metrics.
198 */
199 void forceRecompute();
200
201 /**
202 * Get the amount of time that updates were blocked.
203 */
204 long getUpdatesBlockedTime();
205 }