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 namespace this table is in. 36 * @return String version of the namespace. Can't be empty. 37 */ 38 String getNamespace(); 39 40 /** 41 * Get the name of the region. 42 * 43 * @return The encoded name of the region. 44 */ 45 String getRegionName(); 46 47 /** 48 * Get the number of stores hosted on this region server. 49 */ 50 long getNumStores(); 51 52 /** 53 * Get the number of store files hosted on this region server. 54 */ 55 long getNumStoreFiles(); 56 57 /** 58 * Get the size of the memstore on this region server. 59 */ 60 long getMemstoreSize(); 61 62 /** 63 * Get the total size of the store files this region server is serving from. 64 */ 65 long getStoreFileSize(); 66 67 /** 68 * Get the total number of read requests that have been issued against this region 69 */ 70 long getReadRequestCount(); 71 72 /** 73 * Get the total number of mutations that have been issued against this region. 74 */ 75 long getWriteRequestCount(); 76 77 long getNumFilesCompacted(); 78 79 long getNumBytesCompacted(); 80 81 long getNumCompactionsCompleted(); 82 83 int getRegionHashCode(); 84 85 /** 86 * Get the replica id of this region. 87 */ 88 int getReplicaId(); 89 }