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.hbtop.screen.top;
019
020import java.util.Objects;
021import org.apache.yetus.audience.InterfaceAudience;
022
023
024/**
025 * Represents the summary of the metrics.
026 */
027@InterfaceAudience.Private
028public class Summary {
029  private final String currentTime;
030  private final String version;
031  private final String clusterId;
032  private final int servers;
033  private final int liveServers;
034  private final int deadServers;
035  private final int regionCount;
036  private final int ritCount;
037  private final double averageLoad;
038  private final long aggregateRequestPerSecond;
039
040  public Summary(String currentTime, String version, String clusterId, int servers,
041    int liveServers, int deadServers, int regionCount, int ritCount, double averageLoad,
042    long aggregateRequestPerSecond) {
043    this.currentTime = Objects.requireNonNull(currentTime);
044    this.version = Objects.requireNonNull(version);
045    this.clusterId = Objects.requireNonNull(clusterId);
046    this.servers = servers;
047    this.liveServers = liveServers;
048    this.deadServers = deadServers;
049    this.regionCount = regionCount;
050    this.ritCount = ritCount;
051    this.averageLoad = averageLoad;
052    this.aggregateRequestPerSecond = aggregateRequestPerSecond;
053  }
054
055  public String getCurrentTime() {
056    return currentTime;
057  }
058
059  public String getVersion() {
060    return version;
061  }
062
063  public String getClusterId() {
064    return clusterId;
065  }
066
067  public int getServers() {
068    return servers;
069  }
070
071  public int getLiveServers() {
072    return liveServers;
073  }
074
075  public int getDeadServers() {
076    return deadServers;
077  }
078
079  public int getRegionCount() {
080    return regionCount;
081  }
082
083  public int getRitCount() {
084    return ritCount;
085  }
086
087  public double getAverageLoad() {
088    return averageLoad;
089  }
090
091  public long getAggregateRequestPerSecond() {
092    return aggregateRequestPerSecond;
093  }
094}