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

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()
          Constructor, for Writable
ClusterStatus(String hbaseVersion, String clusterid, Map<ServerName,HServerLoad> servers, Collection<ServerName> deadServers, ServerName master, Collection<ServerName> backupMasters, Map<String,AssignmentManager.RegionState> rit, String[] masterCoprocessors)
           
 
Method Summary
 boolean equals(Object o)
           
 double getAverageLoad()
           
 Collection<ServerName> getBackupMasters()
           
 int getBackupMastersSize()
           
 String getClusterId()
           
 Collection<ServerName> getDeadServerNames()
           
 int getDeadServers()
           
 String getHBaseVersion()
           
 HServerLoad getLoad(ServerName sn)
           
 ServerName getMaster()
          Returns detailed information about the current master ServerName.
 String[] getMasterCoprocessors()
           
 int getRegionsCount()
           
 Map<String,AssignmentManager.RegionState> getRegionsInTransition()
           
 int getRequestsCount()
           
 Collection<ServerName> getServerInfo()
          Deprecated. Use getServers()
 Collection<ServerName> getServers()
           
 int getServersSize()
           
 byte getVersion()
           
 int hashCode()
           
 void readFields(DataInput in)
           
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterStatus

public ClusterStatus()
Constructor, for Writable


ClusterStatus

public ClusterStatus(String hbaseVersion,
                     String clusterid,
                     Map<ServerName,HServerLoad> servers,
                     Collection<ServerName> deadServers,
                     ServerName master,
                     Collection<ServerName> backupMasters,
                     Map<String,AssignmentManager.RegionState> rit,
                     String[] masterCoprocessors)
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 HServerLoad getLoad(ServerName sn)
Parameters:
sn -
Returns:
Server's load or null if not found.

getRegionsInTransition

public Map<String,AssignmentManager.RegionState> getRegionsInTransition()

getClusterId

public String getClusterId()

getMasterCoprocessors

public String[] getMasterCoprocessors()

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Overrides:
write in class org.apache.hadoop.io.VersionedWritable
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Overrides:
readFields in class org.apache.hadoop.io.VersionedWritable
Throws:
IOException


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.