@InterfaceAudience.Public public class ClusterStatus extends org.apache.hadoop.io.VersionedWritable
ClusterStatus provides clients with information such as:
ClusterStatus.Options
provides a way to filter out infos which unwanted.
The following codes will retrieve all the cluster information.
// 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(Options.defaultOptions());
If information about dead servers and master coprocessors are unwanted,
then codes in the following way:
Admin admin = connection.getAdmin();
ClusterStatus status = admin.getClusterStatus(
Options.defaultOptions()
.excludeDeadServers()
.excludeMasterCoprocessors());
Modifier and Type | Class and Description |
---|---|
static class |
ClusterStatus.Builder
Builder for construct a ClusterStatus.
|
static class |
ClusterStatus.Options
Options provides a way to filter out unwanted information.
|
Constructor and Description |
---|
ClusterStatus(String hbaseVersion,
String clusterid,
Map<ServerName,ServerLoad> servers,
Collection<ServerName> deadServers,
ServerName master,
Collection<ServerName> backupMasters,
List<RegionState> rit,
String[] masterCoprocessors,
Boolean balancerOn)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
(HBASE-15511).
|
@Deprecated public ClusterStatus(String hbaseVersion, String clusterid, Map<ServerName,ServerLoad> servers, Collection<ServerName> deadServers, ServerName master, Collection<ServerName> backupMasters, List<RegionState> rit, String[] masterCoprocessors, Boolean balancerOn)
ClusterStatus.Builder
to construct a ClusterStatus instead.public Collection<ServerName> getDeadServerNames()
public int getServersSize()
@Deprecated public int getDeadServers()
getDeadServersSize()
.public int getDeadServersSize()
public double getAverageLoad()
public int getRegionsCount()
public int getRequestsCount()
public String getHBaseVersion()
public boolean equals(Object o)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public byte getVersion()
getVersion
in class org.apache.hadoop.io.VersionedWritable
public Collection<ServerName> getServers()
public ServerName getMaster()
ServerName
.public int getBackupMastersSize()
public Collection<ServerName> getBackupMasters()
public ServerLoad getLoad(ServerName sn)
sn
- @InterfaceAudience.Private public List<RegionState> getRegionsInTransition()
public String getClusterId()
public String[] getMasterCoprocessors()
public long getLastMajorCompactionTsForTable(TableName table)
public long getLastMajorCompactionTsForRegion(byte[] region)
public boolean isBalancerOn()
public Boolean getBalancerOn()
public static ClusterStatus.Builder newBuilder()
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.