org.apache.hadoop.hbase
Class ClusterStatus

java.lang.Object
  extended by org.apache.hadoop.io.VersionedWritable
      extended by org.apache.hadoop.hbase.ClusterStatus
All Implemented Interfaces:
org.apache.hadoop.io.Writable

@InterfaceAudience.Public
@InterfaceStability.Evolving
public class ClusterStatus
extends org.apache.hadoop.io.VersionedWritable

Status information on the HBase cluster.

ClusterStatus provides clients with information such as:


Constructor Summary
ClusterStatus()
          Deprecated. Used by Writables and Writables are going away.
ClusterStatus(String hbaseVersion, String clusterid, Map<ServerName,ServerLoad> servers, Collection<ServerName> deadServers, ServerName master, Collection<ServerName> backupMasters, Map<String,RegionState> rit, String[] masterCoprocessors, Boolean balancerOn)
           
 
Method Summary
 org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.ClusterStatus convert()
          Convert a ClusterStatus to a protobuf ClusterStatus
static ClusterStatus convert(org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.ClusterStatus proto)
          Convert a protobuf ClusterStatus to a ClusterStatus
 boolean equals(Object o)
           
 double getAverageLoad()
           
 Collection<ServerName> getBackupMasters()
           
 int getBackupMastersSize()
           
 Boolean getBalancerOn()
           
 String getClusterId()
           
 Collection<ServerName> getDeadServerNames()
           
 int getDeadServers()
           
 String getHBaseVersion()
           
 ServerLoad getLoad(ServerName sn)
           
 ServerName getMaster()
          Returns detailed information about the current master ServerName.
 String[] getMasterCoprocessors()
           
 int getRegionsCount()
           
 Map<String,RegionState> getRegionsInTransition()
           
 int getRequestsCount()
           
 Collection<ServerName> getServerInfo()
          Deprecated. Use getServers()
 Collection<ServerName> getServers()
           
 int getServersSize()
           
 byte getVersion()
           
 int hashCode()
           
 boolean isBalancerOn()
           
 String toString()
           
 
Methods inherited from class org.apache.hadoop.io.VersionedWritable
readFields, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClusterStatus

@Deprecated
public ClusterStatus()
Deprecated. Used by Writables and Writables are going away.

Constructor, for Writable


ClusterStatus

public ClusterStatus(String hbaseVersion,
                     String clusterid,
                     Map<ServerName,ServerLoad> servers,
                     Collection<ServerName> deadServers,
                     ServerName master,
                     Collection<ServerName> backupMasters,
                     Map<String,RegionState> rit,
                     String[] masterCoprocessors,
                     Boolean balancerOn)
Method Detail

getDeadServerNames

public Collection<ServerName> getDeadServerNames()
Returns:
the names of region servers on the dead list

getServersSize

public int getServersSize()
Returns:
the number of region servers in the cluster

getDeadServers

public int getDeadServers()
Returns:
the number of dead region servers in the cluster

getAverageLoad

public double getAverageLoad()
Returns:
the average cluster load

getRegionsCount

public int getRegionsCount()
Returns:
the number of regions deployed on the cluster

getRequestsCount

public int getRequestsCount()
Returns:
the number of requests since last report

getHBaseVersion

public String getHBaseVersion()
Returns:
the HBase version string as reported by the HMaster

equals

public boolean equals(Object o)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

getVersion

public byte getVersion()
Specified by:
getVersion in class org.apache.hadoop.io.VersionedWritable
Returns:
the object version number

getServerInfo

public Collection<ServerName> getServerInfo()
Deprecated. Use getServers()

Returns detailed region server information: A list of ServerName.

Returns:
region server information

getServers

public Collection<ServerName> getServers()

getMaster

public ServerName getMaster()
Returns detailed information about the current master ServerName.

Returns:
current master information if it exists

getBackupMastersSize

public int getBackupMastersSize()
Returns:
the number of backup masters in the cluster

getBackupMasters

public Collection<ServerName> getBackupMasters()
Returns:
the names of backup masters

getLoad

public ServerLoad getLoad(ServerName sn)
Parameters:
sn -
Returns:
Server's load or null if not found.

getRegionsInTransition

@InterfaceAudience.Private
public Map<String,RegionState> getRegionsInTransition()

getClusterId

public String getClusterId()

getMasterCoprocessors

public String[] getMasterCoprocessors()

isBalancerOn

public boolean isBalancerOn()

getBalancerOn

public Boolean getBalancerOn()

toString

public String toString()
Overrides:
toString in class Object

convert

public org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.ClusterStatus convert()
Convert a ClusterStatus to a protobuf ClusterStatus

Returns:
the protobuf ClusterStatus

convert

public static ClusterStatus convert(org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.ClusterStatus proto)
Convert a protobuf ClusterStatus to a ClusterStatus

Parameters:
proto - the protobuf ClusterStatus
Returns:
the converted ClusterStatus


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.