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  package org.apache.hadoop.hbase.hbtop.screen.top;
19  
20  import java.util.Objects;
21  import org.apache.hadoop.hbase.classification.InterfaceAudience;
22  
23  /**
24   * Represents the summary of the metrics.
25   */
26  @InterfaceAudience.Private
27  public class Summary {
28    private final String currentTime;
29    private final String version;
30    private final String clusterId;
31    private final int servers;
32    private final int liveServers;
33    private final int deadServers;
34    private final int regionCount;
35    private final int ritCount;
36    private final double averageLoad;
37    private final long aggregateRequestPerSecond;
38  
39    public Summary(String currentTime, String version, String clusterId, int servers,
40      int liveServers, int deadServers, int regionCount, int ritCount, double averageLoad,
41      long aggregateRequestPerSecond) {
42      this.currentTime = Objects.requireNonNull(currentTime);
43      this.version = Objects.requireNonNull(version);
44      this.clusterId = Objects.requireNonNull(clusterId);
45      this.servers = servers;
46      this.liveServers = liveServers;
47      this.deadServers = deadServers;
48      this.regionCount = regionCount;
49      this.ritCount = ritCount;
50      this.averageLoad = averageLoad;
51      this.aggregateRequestPerSecond = aggregateRequestPerSecond;
52    }
53  
54    public String getCurrentTime() {
55      return currentTime;
56    }
57  
58    public String getVersion() {
59      return version;
60    }
61  
62    public String getClusterId() {
63      return clusterId;
64    }
65  
66    public int getServers() {
67      return servers;
68    }
69  
70    public int getLiveServers() {
71      return liveServers;
72    }
73  
74    public int getDeadServers() {
75      return deadServers;
76    }
77  
78    public int getRegionCount() {
79      return regionCount;
80    }
81  
82    public int getRitCount() {
83      return ritCount;
84    }
85  
86    public double getAverageLoad() {
87      return averageLoad;
88    }
89  
90    public long getAggregateRequestPerSecond() {
91      return aggregateRequestPerSecond;
92    }
93  }