@InterfaceAudience.Public public interface ClusterMetrics
ClusterMetrics 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.
{ @code // Original version still works Admin admin = connection.getAdmin(); ClusterMetrics metrics = admin.getClusterStatus(); // or below, a new version which has the same effects ClusterMetrics metrics = 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(); ClusterMetrics metrics = admin.getClusterStatus(EnumSet.of(Option.LIVE_SERVERS)); }
Modifier and Type | Interface and Description |
---|---|
static class |
ClusterMetrics.Option
Kinds of ClusterMetrics
|
Modifier and Type | Method and Description |
---|---|
default double |
getAverageLoad()
Returns the average cluster load
|
List<ServerName> |
getBackupMasterNames()
Returns the names of backup masters
|
Boolean |
getBalancerOn() |
String |
getClusterId() |
List<ServerName> |
getDeadServerNames()
Returns the names of region servers on the dead list
|
String |
getHBaseVersion()
Returns the HBase version string as reported by the HMaster
|
default long |
getLastMajorCompactionTimestamp(byte[] regionName) |
default long |
getLastMajorCompactionTimestamp(TableName table) |
Map<ServerName,ServerMetrics> |
getLiveServerMetrics()
Returns the names of region servers on the live list
|
List<String> |
getMasterCoprocessorNames() |
int |
getMasterInfoPort() |
ServerName |
getMasterName()
Returns detailed information about the current master
ServerName . |
List<ServerTask> |
getMasterTasks()
Provide the list of master tasks
|
default int |
getRegionCount()
Returns the number of regions deployed on the cluster
|
List<RegionState> |
getRegionStatesInTransition() |
default long |
getRequestCount()
Returns the number of requests since last report
|
List<ServerName> |
getServersName() |
Map<TableName,RegionStatesCount> |
getTableRegionStatesCount()
Provide region states count for given table.
|
List<ServerName> |
getUnknownServerNames()
Returns the names of region servers on the unknown list
|
@Nullable String getHBaseVersion()
List<ServerName> getDeadServerNames()
List<ServerName> getUnknownServerNames()
Map<ServerName,ServerMetrics> getLiveServerMetrics()
default int getRegionCount()
default long getRequestCount()
@Nullable ServerName getMasterName()
ServerName
.List<ServerName> getBackupMasterNames()
@InterfaceAudience.Private List<RegionState> getRegionStatesInTransition()
@Nullable String getClusterId()
List<String> getMasterCoprocessorNames()
default long getLastMajorCompactionTimestamp(TableName table)
default long getLastMajorCompactionTimestamp(byte[] regionName)
@Nullable Boolean getBalancerOn()
int getMasterInfoPort()
List<ServerName> getServersName()
default double getAverageLoad()
Map<TableName,RegionStatesCount> getTableRegionStatesCount()
@Nullable List<ServerTask> getMasterTasks()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.