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  /**
23   * This interface will be implemented to allow single regions to push metrics into
24   * MetricsRegionAggregateSource that will in turn push data to the Hadoop metrics system.
25   */
26  public interface MetricsRegionSource extends Comparable<MetricsRegionSource> {
27  
28    /**
29     * Close the region's metrics as this region is closing.
30     */
31    void close();
32  
33    /**
34     * Update related counts of puts.
35     */
36    void updatePut();
37  
38    /**
39     * Update related counts of deletes.
40     */
41    void updateDelete();
42  
43    /**
44     * Update related counts of gets.
45     */
46    void updateGet();
47  
48    /**
49     * Update related counts of increments.
50     */
51    void updateIncrement();
52  
53    /**
54     * Update related counts of appends.
55     */
56    void updateAppend();
57  
58    /**
59     * Get the aggregate source to which this reports.
60     */
61    MetricsRegionAggregateSource getAggregateSource();
62  }