ClusterMetrics
instead.@InterfaceAudience.Public @Deprecated public class ClusterStatus extends Object implements ClusterMetrics
ClusterStatus provides clients with information such as:
ClusterMetrics.Option
provides a way to get desired ClusterStatus information.
The following codes will get 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(EnumSet.allOf(Option.class));
If information about live servers is the only wanted.
then codes in the following way:
Admin admin = connection.getAdmin();
ClusterStatus status = admin.getClusterStatus(EnumSet.of(Option.LIVE_SERVERS));
ClusterMetrics.Option
Modifier and Type | Field and Description |
---|---|
private ClusterMetrics |
metrics
Deprecated.
|
private static byte |
VERSION
Deprecated.
|
Constructor and Description |
---|
ClusterStatus(ClusterMetrics metrics)
Deprecated.
|
ClusterStatus(String hbaseVersion,
String clusterid,
Map<ServerName,ServerLoad> servers,
Collection<ServerName> deadServers,
ServerName master,
Collection<ServerName> backupMasters,
List<RegionState> rit,
String[] masterCoprocessors,
Boolean balancerOn,
int masterInfoPort)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Deprecated.
|
List<ServerName> |
getBackupMasterNames()
Deprecated.
|
List<ServerName> |
getBackupMasters()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
getBackupMasterNames() instead. |
int |
getBackupMastersSize()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
getBackupMasterNames() instead. |
Boolean |
getBalancerOn()
Deprecated.
|
String |
getClusterId()
Deprecated.
|
List<ServerName> |
getDeadServerNames()
Deprecated.
|
int |
getDeadServers()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
(HBASE-13656).
Use
getDeadServerNames() . |
int |
getDeadServersSize()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
getDeadServerNames() . |
String |
getHBaseVersion()
Deprecated.
|
long |
getLastMajorCompactionTsForRegion(byte[] region)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
ClusterMetrics.getLastMajorCompactionTimestamp(byte[]) instead. |
long |
getLastMajorCompactionTsForTable(TableName table)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
ClusterMetrics.getLastMajorCompactionTimestamp(TableName) instead. |
private Map<ServerName,ServerLoad> |
getLiveServerLoads()
Deprecated.
|
Map<ServerName,ServerMetrics> |
getLiveServerMetrics()
Deprecated.
|
ServerLoad |
getLoad(ServerName sn)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
getLiveServerMetrics() instead. |
ServerName |
getMaster()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
getMasterName() instead. |
List<String> |
getMasterCoprocessorNames()
Deprecated.
|
String[] |
getMasterCoprocessors()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
getMasterCoprocessorNames() instead. |
int |
getMasterInfoPort()
Deprecated.
|
ServerName |
getMasterName()
Deprecated.
Returns detailed information about the current master
ServerName . |
int |
getRegionsCount()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
ClusterMetrics.getRegionCount() . |
List<RegionState> |
getRegionStatesInTransition()
Deprecated.
|
int |
getRequestsCount()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
ClusterMetrics.getRequestCount() instead. |
Collection<ServerName> |
getServers()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
getLiveServerMetrics() instead. |
int |
getServersSize()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
getLiveServerMetrics() . |
byte |
getVersion()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
|
int |
hashCode()
Deprecated.
|
boolean |
isBalancerOn()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
No flag in 2.0
|
String |
toString()
Deprecated.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAverageLoad, getLastMajorCompactionTimestamp, getLastMajorCompactionTimestamp, getRegionCount, getRequestCount
private static final byte VERSION
private final ClusterMetrics metrics
@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, int masterInfoPort)
@InterfaceAudience.Private public ClusterStatus(ClusterMetrics metrics)
public List<ServerName> getDeadServerNames()
getDeadServerNames
in interface ClusterMetrics
public Map<ServerName,ServerMetrics> getLiveServerMetrics()
getLiveServerMetrics
in interface ClusterMetrics
@Deprecated public int getServersSize()
getLiveServerMetrics()
.@Deprecated public int getDeadServers()
getDeadServerNames()
.@Deprecated public int getDeadServersSize()
getDeadServerNames()
.@Deprecated public int getRegionsCount()
ClusterMetrics.getRegionCount()
.@Deprecated public int getRequestsCount()
ClusterMetrics.getRequestCount()
instead.@Nullable public ServerName getMasterName()
ClusterMetrics
ServerName
.getMasterName
in interface ClusterMetrics
public List<ServerName> getBackupMasterNames()
getBackupMasterNames
in interface ClusterMetrics
public List<RegionState> getRegionStatesInTransition()
getRegionStatesInTransition
in interface ClusterMetrics
public String getHBaseVersion()
getHBaseVersion
in interface ClusterMetrics
private Map<ServerName,ServerLoad> getLiveServerLoads()
@Deprecated public byte getVersion()
@Deprecated public Collection<ServerName> getServers()
getLiveServerMetrics()
instead.@Deprecated public ServerName getMaster()
getMasterName()
instead.ServerName
.@Deprecated public int getBackupMastersSize()
getBackupMasterNames()
instead.@Deprecated public List<ServerName> getBackupMasters()
getBackupMasterNames()
instead.@Deprecated public ServerLoad getLoad(ServerName sn)
getLiveServerMetrics()
instead.sn
- public String getClusterId()
getClusterId
in interface ClusterMetrics
public List<String> getMasterCoprocessorNames()
getMasterCoprocessorNames
in interface ClusterMetrics
@Deprecated public String[] getMasterCoprocessors()
getMasterCoprocessorNames()
instead.@Deprecated public long getLastMajorCompactionTsForTable(TableName table)
ClusterMetrics.getLastMajorCompactionTimestamp(TableName)
instead.@Deprecated public long getLastMajorCompactionTsForRegion(byte[] region)
ClusterMetrics.getLastMajorCompactionTimestamp(byte[])
instead.@Deprecated public boolean isBalancerOn()
public Boolean getBalancerOn()
getBalancerOn
in interface ClusterMetrics
public int getMasterInfoPort()
getMasterInfoPort
in interface ClusterMetrics
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.