View Javadoc

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 interface will be implemented to allow region server to push table metrics into
23   * MetricsRegionAggregateSource that will in turn push data to the Hadoop metrics system.
24   */
25  public interface MetricsTableSource extends Comparable<MetricsTableSource> {
26  
27    String READ_REQUEST_COUNT = "readRequestCount";
28    String READ_REQUEST_COUNT_DESC = "Number fo read requests";
29    String WRITE_REQUEST_COUNT = "writeRequestCount";
30    String WRITE_REQUEST_COUNT_DESC = "Number fo write requests";
31    String TOTAL_REQUEST_COUNT = "totalRequestCount";
32    String TOTAL_REQUEST_COUNT_DESC = "Number fo total requests";
33    String MEMSTORE_SIZE = "memstoreSize";
34    String MEMSTORE_SIZE_DESC = "The size of memory stores";
35    String STORE_FILE_SIZE = "storeFileSize";
36    String STORE_FILE_SIZE_DESC = "The size of store files size";
37    String TABLE_SIZE = "tableSize";
38    String TABLE_SIZE_DESC = "Total size of the table in the region server";
39  
40    String getTableName();
41  
42    /**
43     * Close the table's metrics as all the region are closing.
44     */
45    void close();
46  
47    /**
48     * Get the aggregate source to which this reports.
49     */
50    MetricsTableAggregateSource getAggregateSource();
51  
52  }