Package org.apache.hadoop.hbase.master
Class MetricsMasterSourceImpl
java.lang.Object
org.apache.hadoop.hbase.metrics.BaseSourceImpl
org.apache.hadoop.hbase.master.MetricsMasterSourceImpl
- All Implemented Interfaces:
MetricsMasterSource
,BaseSource
,org.apache.hadoop.metrics2.MetricsSource
Hadoop2 implementation of MetricsMasterSource. Implements BaseSource through BaseSourceImpl,
following the pattern
-
Field Summary
Modifier and TypeFieldDescriptionprivate MutableFastCounter
private MutableFastCounter
private MutableFastCounter
private final MetricsMasterWrapper
private OperationMetrics
Fields inherited from class org.apache.hadoop.hbase.metrics.BaseSourceImpl
metricsAdapter, metricsContext, metricsDescription, metricsJmxContext, metricsName, metricsRegistry, registry
Fields inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
HBASE_METRICS_SYSTEM_NAME
Fields inherited from interface org.apache.hadoop.hbase.master.MetricsMasterSource
AVERAGE_LOAD_DESC, AVERAGE_LOAD_NAME, CLUSTER_ID_DESC, CLUSTER_ID_NAME, CLUSTER_READ_REQUESTS_NAME, CLUSTER_REQUESTS_NAME, CLUSTER_WRITE_REQUESTS_NAME, DEAD_REGION_SERVERS_DESC, DEAD_REGION_SERVERS_NAME, DRAINING_REGION_SERVER_DESC, DRAINING_REGION_SERVER_NAME, IS_ACTIVE_MASTER_DESC, IS_ACTIVE_MASTER_NAME, LIVE_REGION_SERVERS_DESC, LIVE_REGION_SERVERS_NAME, MASTER_ACTIVE_TIME_DESC, MASTER_ACTIVE_TIME_NAME, MASTER_FINISHED_INITIALIZATION_TIME_DESC, MASTER_FINISHED_INITIALIZATION_TIME_NAME, MASTER_START_TIME_DESC, MASTER_START_TIME_NAME, MERGE_PLAN_COUNT_DESC, MERGE_PLAN_COUNT_NAME, METRICS_CONTEXT, METRICS_DESCRIPTION, METRICS_JMX_CONTEXT, METRICS_NAME, NUM_DEAD_REGION_SERVERS_NAME, NUM_DRAINING_REGION_SERVERS_NAME, NUM_REGION_SERVERS_NAME, NUMBER_OF_DEAD_REGION_SERVERS_DESC, NUMBER_OF_DRAINING_REGION_SERVERS_DESC, NUMBER_OF_REGION_SERVERS_DESC, OFFLINE_REGION_COUNT_DESC, OFFLINE_REGION_COUNT_NAME, OLD_WAL_DIR_SIZE_DESC, OLD_WAL_DIR_SIZE_NAME, ONLINE_REGION_COUNT_DESC, ONLINE_REGION_COUNT_NAME, SERVER_CRASH_METRIC_PREFIX, SERVER_NAME_DESC, SERVER_NAME_NAME, SPLIT_PLAN_COUNT_DESC, SPLIT_PLAN_COUNT_NAME, ZOOKEEPER_QUORUM_DESC, ZOOKEEPER_QUORUM_NAME
-
Constructor Summary
ConstructorDescriptionMetricsMasterSourceImpl
(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext, MetricsMasterWrapper masterWrapper) MetricsMasterSourceImpl
(MetricsMasterWrapper masterWrapper) -
Method Summary
Modifier and TypeMethodDescriptionvoid
getMetrics
(org.apache.hadoop.metrics2.MetricsCollector metricsCollector, boolean all) ReturnsOperationMetrics
containing common metrics for server crash operationvoid
incReadRequests
(long inc) Increment the number of read requests the cluster has seen.void
incRequests
(long inc) Increment the number of requests the cluster has seen.void
incWriteRequests
(long inc) Increment the number of write requests the cluster has seen.void
init()
Clear out the metrics and re-prepare the source.Methods inherited from class org.apache.hadoop.hbase.metrics.BaseSourceImpl
decGauge, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, getMetricsRegistry, incCounters, incGauge, removeMetric, setGauge, updateHistogram
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
decGauge, getMetricRegistryInfo, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, incCounters, incGauge, removeMetric, setGauge, updateHistogram
-
Field Details
-
masterWrapper
-
clusterRequestsCounter
-
clusterReadRequestsCounter
-
clusterWriteRequestsCounter
-
serverCrashMetrics
-
-
Constructor Details
-
MetricsMasterSourceImpl
-
MetricsMasterSourceImpl
public MetricsMasterSourceImpl(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext, MetricsMasterWrapper masterWrapper)
-
-
Method Details
-
init
Description copied from interface:BaseSource
Clear out the metrics and re-prepare the source.- Specified by:
init
in interfaceBaseSource
- Overrides:
init
in classBaseSourceImpl
-
incRequests
Description copied from interface:MetricsMasterSource
Increment the number of requests the cluster has seen.- Specified by:
incRequests
in interfaceMetricsMasterSource
- Parameters:
inc
- Ammount to increment the total by.
-
incReadRequests
Description copied from interface:MetricsMasterSource
Increment the number of read requests the cluster has seen.- Specified by:
incReadRequests
in interfaceMetricsMasterSource
- Parameters:
inc
- Ammount to increment the total by.
-
incWriteRequests
Description copied from interface:MetricsMasterSource
Increment the number of write requests the cluster has seen.- Specified by:
incWriteRequests
in interfaceMetricsMasterSource
- Parameters:
inc
- Ammount to increment the total by.
-
getMetrics
- Specified by:
getMetrics
in interfaceorg.apache.hadoop.metrics2.MetricsSource
- Overrides:
getMetrics
in classBaseSourceImpl
-
getServerCrashMetrics
Description copied from interface:MetricsMasterSource
ReturnsOperationMetrics
containing common metrics for server crash operation- Specified by:
getServerCrashMetrics
in interfaceMetricsMasterSource
-