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 */
018
019package org.apache.hadoop.hbase.regionserver;
020
021import java.util.Map;
022
023import org.apache.yetus.audience.InterfaceAudience;
024
025/**
026 * Interface of class that will wrap a MetricsTableSource and export numbers so they can be
027 * used in MetricsTableSource
028 */
029@InterfaceAudience.Private
030public interface MetricsTableWrapperAggregate {
031  public String HASH = "#";
032  /**
033   * Get the number of read requests that have been issued against this table
034   */
035  long getReadRequestCount(String table);
036
037  /**
038   * Get the number of write requests that have been issued against this table
039   */
040  long getFilteredReadRequestCount(String table);
041  /**
042   * Get the number of write requests that have been issued for this table
043   */
044  long getWriteRequestCount(String table);
045
046  /**
047   * Get the total number of requests that have been issued for this table
048   */
049  long getTotalRequestsCount(String table);
050
051  /**
052   * Get the memory store size against this table
053   */
054  long getMemStoreSize(String table);
055
056  /**
057   * Get the store file size against this table
058   */
059  long getStoreFileSize(String table);
060
061  /**
062   * Get the table region size against this table
063   */
064  long getTableSize(String table);
065
066
067  /**
068   * Get the average region size for this table
069   */
070  long getAvgRegionSize(String table);
071
072  /**
073   * Get the number of regions hosted on for this table
074   */
075  long getNumRegions(String table);
076
077  /**
078   * Get the number of stores hosted on for this table
079   */
080  long getNumStores(String table);
081
082  /**
083   * Get the number of store files hosted for this table
084   */
085  long getNumStoreFiles(String table);
086
087  /**
088   * @return Max age of store files for this table
089   */
090  long getMaxStoreFileAge(String table);
091
092  /**
093   * @return Min age of store files for this table
094   */
095  long getMinStoreFileAge(String table);
096
097  /**
098   *  @return Average age of store files for this table
099   */
100  long getAvgStoreFileAge(String table);
101
102  /**
103   *  @return Number of reference files for this table
104   */
105  long getNumReferenceFiles(String table);
106
107  /**
108   * @return number of row reads completely from memstore per store for this table
109   */
110  Map<String, Long> getMemstoreOnlyRowReadsCount(String table);
111
112  /**
113   * @return number of row reads from file and memstore per store for this table
114   */
115  Map<String, Long> getMixedRowReadsCount(String table);
116}