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 * Interface of class that will wrap an HRegion and export numbers so they can be 23 * used in MetricsRegionSource 24 */ 25 public interface MetricsRegionWrapper { 26 27 /** 28 * Get the name of the table the region belongs to. 29 * 30 * @return The string version of the table name. 31 */ 32 String getTableName(); 33 34 /** 35 * Get the name of the region. 36 * 37 * @return The encoded name of the region. 38 */ 39 String getRegionName(); 40 41 /** 42 * Get the number of stores hosted on this region server. 43 */ 44 long getNumStores(); 45 46 /** 47 * Get the number of store files hosted on this region server. 48 */ 49 long getNumStoreFiles(); 50 51 /** 52 * Get the size of the memstore on this region server. 53 */ 54 long getMemstoreSize(); 55 56 /** 57 * Get the total size of the store files this region server is serving from. 58 */ 59 long getStoreFileSize(); 60 61 /** 62 * Get the total number of read requests that have been issued against this region 63 */ 64 long getReadRequestCount(); 65 66 /** 67 * Get the total number of mutations that have been issued against this region. 68 */ 69 long getWriteRequestCount(); 70 71 }