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 */
018package org.apache.hadoop.hbase.regionserver;
019
020import java.util.Map;
021import org.apache.yetus.audience.InterfaceAudience;
022
023/**
024 * Interface of class that will wrap a MetricsTableSource and export numbers so they can be used in
025 * MetricsTableSource
026 */
027@InterfaceAudience.Private
028public interface MetricsTableWrapperAggregate {
029  public String HASH = "#";
030
031  /**
032   * Get the number of read requests that have been issued against this table
033   */
034  long getReadRequestCount(String table);
035
036  /**
037   * Get the number of CoprocessorService requests that have been issued against this table
038   */
039  long getCpRequestsCount(String table);
040
041  /**
042   * Get the total number of filtered read requests that have been issued against this table
043   */
044  long getFilteredReadRequestCount(String table);
045
046  /**
047   * Get the number of write requests that have been issued for this table
048   */
049  long getWriteRequestCount(String table);
050
051  /**
052   * Get the total number of requests that have been issued for this table
053   */
054  long getTotalRequestsCount(String table);
055
056  /**
057   * Get the memory store size against this table
058   */
059  long getMemStoreSize(String table);
060
061  /**
062   * Get the size of the on heap memstore of this table
063   */
064  long getMemStoreHeapSize(String table);
065
066  /**
067   * Get the size of the off heap memstore of this table
068   */
069  long getMemStoreOffHeapSize(String table);
070
071  /**
072   * Get the store file size against this table
073   */
074  long getStoreFileSize(String table);
075
076  /**
077   * Get the table region size against this table
078   */
079  long getTableSize(String table);
080
081  /**
082   * Get the average region size for this table
083   */
084  long getAvgRegionSize(String table);
085
086  /**
087   * Get the number of regions hosted on for this table
088   */
089  long getNumRegions(String table);
090
091  /**
092   * Get the number of stores hosted on for this table
093   */
094  long getNumStores(String table);
095
096  /**
097   * Get the number of store files hosted for this table
098   */
099  long getNumStoreFiles(String table);
100
101  /**
102   * Get the max number of store files across all regions of this table
103   */
104  long getMaxStoreFiles(String table);
105
106  /** Returns Max age of store files for this table */
107  long getMaxStoreFileAge(String table);
108
109  /** Returns Min age of store files for this table */
110  long getMinStoreFileAge(String table);
111
112  /** Returns Average age of store files for this table */
113  long getAvgStoreFileAge(String table);
114
115  /** Returns the size of the static indexes for this table */
116  long getStaticIndexSize(String table);
117
118  /** Returns the size of the static blooms for this table */
119  long getStaticBloomSize(String table);
120
121  /** Returns count of bloom filter requests for this table. */
122  long getBloomFilterRequestsCount(String table);
123
124  /** Returns count of bloom filter requests which return a negative result for this table. */
125  long getBloomFilterNegativeResultsCount(String table);
126
127  /**
128   * Returns count of requests which could have used bloom filters for this table, but they weren't
129   * configured or loaded.
130   */
131  long getBloomFilterEligibleRequestsCount(String table);
132
133  /** Returns Number of reference files for this table */
134  long getNumReferenceFiles(String table);
135
136  /** Returns number of row reads completely from memstore per store for this table */
137  Map<String, Long> getMemstoreOnlyRowReadsCount(String table);
138
139  /** Returns number of row reads from file and memstore per store for this table */
140  Map<String, Long> getMixedRowReadsCount(String table);
141}