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.master;
20  
21  /**
22   * This is the interface that will expose information to hadoop1/hadoop2 implementations of the
23   * MetricsMasterSource.
24   */
25  public interface MetricsMasterWrapper {
26  
27    /**
28     * Get ServerName
29     */
30    String getServerName();
31  
32    /**
33     * Get Average Load
34     *
35     * @return Average Load
36     */
37    double getAverageLoad();
38  
39    /**
40     * Get the Cluster ID
41     *
42     * @return Cluster ID
43     */
44    String getClusterId();
45  
46    /**
47     * Get the Zookeeper Quorum Info
48     *
49     * @return Zookeeper Quorum Info
50     */
51    String getZookeeperQuorum();
52  
53    /**
54     * Get the co-processors
55     *
56     * @return Co-processors
57     */
58    String[] getCoprocessors();
59  
60    /**
61     * Get hbase master start time
62     *
63     * @return Start time of master in milliseconds
64     */
65    long getStartTime();
66  
67    /**
68     * Get the hbase master active time
69     *
70     * @return Time in milliseconds when master became active
71     */
72    long getActiveTime();
73  
74    /**
75     * Whether this master is the active master
76     *
77     * @return True if this is the active master
78     */
79    boolean getIsActiveMaster();
80  
81    /**
82     * Get the live region servers
83     *
84     * @return Live region servers
85     */
86    String getRegionServers();
87  
88    /**
89     * Get the number of live region servers
90     *
91     * @return number of Live region servers
92     */
93  
94    int getNumRegionServers();
95  
96    /**
97     * Get the dead region servers
98     *
99     * @return Dead region Servers
100    */
101   String getDeadRegionServers();
102 
103   /**
104    * Get the number of dead region servers
105    *
106    * @return number of Dead region Servers
107    */
108   int getNumDeadRegionServers();
109 
110 }