Package org.apache.hadoop.hbase
Class ClusterStatus
java.lang.Object
org.apache.hadoop.hbase.ClusterStatus
- All Implemented Interfaces:
ClusterMetrics
Deprecated.
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));
}
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.ClusterMetrics
ClusterMetrics.Option -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClusterMetricsDeprecated.private static final byteDeprecated. -
Constructor Summary
ConstructorsConstructorDescriptionClusterStatus(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.0ClusterStatus(ClusterMetrics metrics) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.Deprecated.Returns the names of backup mastersDeprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UsegetBackupMasterNames()instead.intDeprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UsegetBackupMasterNames()instead.Deprecated.Deprecated.Deprecated.Returns the names of region servers on the dead listintDeprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 (HBASE-13656).intDeprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UsegetDeadServerNames().Deprecated.Returns the HBase version string as reported by the HMasterlonggetLastMajorCompactionTsForRegion(byte[] region) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseClusterMetrics.getLastMajorCompactionTimestamp(byte[])instead.longDeprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseClusterMetrics.getLastMajorCompactionTimestamp(TableName)instead.private Map<ServerName,ServerLoad> Deprecated.Deprecated.Returns the names of region servers on the live listgetLoad(ServerName sn) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UsegetLiveServerMetrics()instead.Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UsegetMasterName()instead.Deprecated.String[]Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UsegetMasterCoprocessorNames()instead.intDeprecated.Deprecated.Returns detailed information about the current masterServerName.Deprecated.Provide the list of master tasksintDeprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseClusterMetrics.getRegionCount().Deprecated.intDeprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseClusterMetrics.getRequestCount()instead.Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UsegetLiveServerMetrics()instead.Deprecated.intDeprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UsegetLiveServerMetrics().Deprecated.Provide region states count for given table.Deprecated.Returns the names of region servers on the unknown listbyteDeprecated.As of release 2.0.0, this will be removed in HBase 3.0.0inthashCode()Deprecated.booleanDeprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 No flag in 2.0toString()Deprecated.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.ClusterMetrics
getAverageLoad, getLastMajorCompactionTimestamp, getLastMajorCompactionTimestamp, getRegionCount, getRequestCount
-
Field Details
-
VERSION
Deprecated.- See Also:
-
metrics
Deprecated.
-
-
Constructor Details
-
ClusterStatus
@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) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 -
ClusterStatus
Deprecated.
-
-
Method Details
-
getDeadServerNames
Deprecated.Returns the names of region servers on the dead list- Specified by:
getDeadServerNamesin interfaceClusterMetrics
-
getUnknownServerNames
Deprecated.Description copied from interface:ClusterMetricsReturns the names of region servers on the unknown list- Specified by:
getUnknownServerNamesin interfaceClusterMetrics
-
getLiveServerMetrics
Deprecated.Description copied from interface:ClusterMetricsReturns the names of region servers on the live list- Specified by:
getLiveServerMetricsin interfaceClusterMetrics
-
getServersSize
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UsegetLiveServerMetrics().- Returns:
- the number of region servers in the cluster
-
getDeadServers
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 (HBASE-13656). UsegetDeadServerNames().- Returns:
- the number of dead region servers in the cluster
-
getDeadServersSize
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UsegetDeadServerNames().- Returns:
- the number of dead region servers in the cluster
-
getRegionsCount
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseClusterMetrics.getRegionCount().- Returns:
- the number of regions deployed on the cluster
-
getRequestsCount
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseClusterMetrics.getRequestCount()instead.- Returns:
- the number of requests since last report
-
getMasterName
Deprecated.Description copied from interface:ClusterMetricsReturns detailed information about the current masterServerName.- Specified by:
getMasterNamein interfaceClusterMetrics- Returns:
- current master information if it exists
-
getBackupMasterNames
Deprecated.Description copied from interface:ClusterMetricsReturns the names of backup masters- Specified by:
getBackupMasterNamesin interfaceClusterMetrics
-
getRegionStatesInTransition
Deprecated.- Specified by:
getRegionStatesInTransitionin interfaceClusterMetrics
-
getHBaseVersion
Deprecated.Returns the HBase version string as reported by the HMaster- Specified by:
getHBaseVersionin interfaceClusterMetrics
-
getLiveServerLoads
Deprecated. -
equals
Deprecated. -
hashCode
Deprecated. -
getVersion
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0- Returns:
- the object version number
-
getServers
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UsegetLiveServerMetrics()instead. -
getMaster
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UsegetMasterName()instead.Returns detailed information about the current masterServerName.- Returns:
- current master information if it exists
-
getBackupMastersSize
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UsegetBackupMasterNames()instead.- Returns:
- the number of backup masters in the cluster
-
getBackupMasters
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UsegetBackupMasterNames()instead.- Returns:
- the names of backup masters
-
getLoad
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UsegetLiveServerMetrics()instead.- Returns:
- Server's load or null if not found.
-
getClusterId
Deprecated.- Specified by:
getClusterIdin interfaceClusterMetrics
-
getMasterCoprocessorNames
Deprecated.- Specified by:
getMasterCoprocessorNamesin interfaceClusterMetrics
-
getMasterCoprocessors
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UsegetMasterCoprocessorNames()instead.Get the list of master coprocessor names. -
getLastMajorCompactionTsForTable
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseClusterMetrics.getLastMajorCompactionTimestamp(TableName)instead.Get the last major compaction time for a given table. -
getLastMajorCompactionTsForRegion
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseClusterMetrics.getLastMajorCompactionTimestamp(byte[])instead.Get the last major compaction time for a given region. -
isBalancerOn
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 No flag in 2.0Returns true if the balancer is enabled. -
getBalancerOn
Deprecated.- Specified by:
getBalancerOnin interfaceClusterMetrics
-
getMasterInfoPort
Deprecated.- Specified by:
getMasterInfoPortin interfaceClusterMetrics
-
getServersName
Deprecated.- Specified by:
getServersNamein interfaceClusterMetrics
-
getTableRegionStatesCount
Deprecated.Description copied from interface:ClusterMetricsProvide region states count for given table. e.g howmany regions of give table are opened/closed/rit etc- Specified by:
getTableRegionStatesCountin interfaceClusterMetrics- Returns:
- map of table to region states count
-
getMasterTasks
Deprecated.Description copied from interface:ClusterMetricsProvide the list of master tasks- Specified by:
getMasterTasksin interfaceClusterMetrics
-
toString
Deprecated.
-
ClusterMetricsinstead.