Class ClusterStatus

java.lang.Object
org.apache.hadoop.hbase.ClusterStatus
All Implemented Interfaces:
ClusterMetrics

@Public @Deprecated public class ClusterStatus extends Object implements ClusterMetrics
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0 Use ClusterMetrics instead.
Status information on the HBase cluster.

ClusterStatus provides clients with information such as:

  • The count and names of region servers in the cluster.
  • The count and names of dead region servers in the cluster.
  • The name of the active master for the cluster.
  • The name(s) of the backup master(s) for the cluster, if they exist.
  • The average cluster load.
  • The number of regions deployed on the cluster.
  • The number of requests since last report.
  • Detailed region server loading and resource usage information, per server and per region.
  • Regions in transition at master
  • The unique cluster ID
ClusterMetrics.Option provides a way to get desired ClusterStatus information. The following codes will get all the cluster information.
 {
   @code
   // Original version still works
   Admin admin = connection.getAdmin();
   ClusterStatus status = admin.getClusterStatus();
   // or below, a new version which has the same effects
   ClusterStatus status = admin.getClusterStatus(EnumSet.allOf(Option.class));
 }
 
If information about live servers is the only wanted. then codes in the following way:
 {
   @code
   Admin admin = connection.getAdmin();
   ClusterStatus status = admin.getClusterStatus(EnumSet.of(Option.LIVE_SERVERS));
 }