Class MetricsZooKeeperSourceImpl
java.lang.Object
org.apache.hadoop.hbase.metrics.BaseSourceImpl
org.apache.hadoop.hbase.zookeeper.MetricsZooKeeperSourceImpl
- All Implemented Interfaces:
BaseSource,MetricsZooKeeperSource,org.apache.hadoop.metrics2.MetricsSource
@Private
public class MetricsZooKeeperSourceImpl
extends BaseSourceImpl
implements MetricsZooKeeperSource
Class that transitions metrics from MetricsZooKeeper into the metrics subsystem. Implements
BaseSource through BaseSourceImpl, following the pattern.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.hadoop.metrics2.lib.MutableGaugeLongprivate final org.apache.hadoop.metrics2.lib.MutableGaugeLongprivate final org.apache.hadoop.metrics2.lib.MutableGaugeLongprivate final org.apache.hadoop.metrics2.lib.MutableGaugeLongprivate final org.apache.hadoop.metrics2.lib.MutableGaugeLongprivate final org.apache.hadoop.metrics2.lib.MutableGaugeLongprivate MutableHistogramprivate final org.apache.hadoop.metrics2.lib.MutableGaugeLongprivate final org.apache.hadoop.metrics2.lib.MutableGaugeLongprivate MutableHistogramprivate final org.apache.hadoop.metrics2.lib.MutableGaugeLongprivate final org.apache.hadoop.metrics2.lib.MutableGaugeLongprivate MutableHistogramFields inherited from class org.apache.hadoop.hbase.metrics.BaseSourceImpl
metricsAdapter, metricsContext, metricsDescription, metricsJmxContext, metricsName, metricsRegistry, registryFields inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
HBASE_METRICS_SYSTEM_NAMEFields inherited from interface org.apache.hadoop.hbase.zookeeper.MetricsZooKeeperSource
EXCEPTION_AUTHFAILED, EXCEPTION_AUTHFAILED_DESC, EXCEPTION_CONNECTIONLOSS, EXCEPTION_CONNECTIONLOSS_DESC, EXCEPTION_DATAINCONSISTENCY, EXCEPTION_DATAINCONSISTENCY_DESC, EXCEPTION_INVALIDACL, EXCEPTION_INVALIDACL_DESC, EXCEPTION_NOAUTH, EXCEPTION_NOAUTH_DESC, EXCEPTION_OPERATIONTIMEOUT, EXCEPTION_OPERATIONTIMEOUT_DESC, EXCEPTION_RUNTIMEINCONSISTENCY, EXCEPTION_RUNTIMEINCONSISTENCY_DESC, EXCEPTION_SESSIONEXPIRED, EXCEPTION_SESSIONEXPIRED_DESC, EXCEPTION_SYSTEMERROR, EXCEPTION_SYSTEMERROR_DESC, METRICS_CONTEXT, METRICS_DESCRIPTION, METRICS_JMX_CONTEXT, METRICS_NAME, READ_OPERATION_LATENCY_DESC, READ_OPERATION_LATENCY_NAME, SYNC_OPERATION_LATENCY_DESC, SYNC_OPERATION_LATENCY_NAME, TOTAL_FAILED_ZK_CALLS, TOTAL_FAILED_ZK_CALLS_DESC, WRITE_OPERATION_LATENCY_DESC, WRITE_OPERATION_LATENCY_NAME -
Constructor Summary
ConstructorsConstructorDescriptionMetricsZooKeeperSourceImpl(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext) -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidclearMetricIfNotNull(org.apache.hadoop.metrics2.lib.MutableGaugeLong metric) private voidvoidgetMetrics(org.apache.hadoop.metrics2.MetricsCollector metricsCollector, boolean all) voidIncrement the count of failed ops due to AUTHFAILED Exception.voidIncrement the count of failed ops due to a CONNECTIONLOSS Exception.voidIncrement the count of failed ops due to a DATAINCONSISTENCY Exception.voidIncrement the count of failed ops due to INVALIDACL Exception.voidIncrement the count of failed ops due to NOAUTH Exception.voidIncrement the count of failed ops due to an OPERATIONTIMEOUT Exception.voidIncrement the count of failed ops due to RUNTIMEINCONSISTENCY Exception.voidIncrement the count of failed ops due to a SESSIONEXPIRED Exception.voidIncrement the count of failed ops due to a SYSTEMERROR Exception.voidRecord the total number of failed ZooKeeper API calls.voidrecordReadOperationLatency(long latency) Record the latency incurred for read operations.voidrecordSyncOperationLatency(long latency) Record the latency incurred for sync operations.voidrecordWriteOperationLatency(long latency) Record the latency incurred for write operations.Methods inherited from class org.apache.hadoop.hbase.metrics.BaseSourceImpl
decGauge, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, getMetricsRegistry, incCounters, incGauge, init, removeMetric, setGauge, updateHistogramMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
decGauge, getMetricRegistryInfo, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, incCounters, incGauge, init, removeMetric, setGauge, updateHistogram
-
Field Details
-
authFailedFailedOpCount
-
connectionLossFailedOpCount
-
dataInconsistencyFailedOpCount
-
invalidACLFailedOpCount
-
noAuthFailedOpCount
-
operationTimeOutFailedOpCount
-
runtimeInconsistencyFailedOpCount
-
sessionExpiredFailedOpCount
-
systemErrorFailedOpCount
-
totalFailedZKCalls
-
readOpLatency
-
writeOpLatency
-
syncOpLatency
-
-
Constructor Details
-
MetricsZooKeeperSourceImpl
public MetricsZooKeeperSourceImpl() -
MetricsZooKeeperSourceImpl
public MetricsZooKeeperSourceImpl(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext)
-
-
Method Details
-
getMetrics
- Specified by:
getMetricsin interfaceorg.apache.hadoop.metrics2.MetricsSource- Overrides:
getMetricsin classBaseSourceImpl
-
clearZKExceptionMetrics
-
clearMetricIfNotNull
-
incrementAuthFailedCount
Description copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to AUTHFAILED Exception.- Specified by:
incrementAuthFailedCountin interfaceMetricsZooKeeperSource
-
incrementConnectionLossCount
Description copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to a CONNECTIONLOSS Exception.- Specified by:
incrementConnectionLossCountin interfaceMetricsZooKeeperSource
-
incrementDataInconsistencyCount
Description copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to a DATAINCONSISTENCY Exception.- Specified by:
incrementDataInconsistencyCountin interfaceMetricsZooKeeperSource
-
incrementInvalidACLCount
Description copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to INVALIDACL Exception.- Specified by:
incrementInvalidACLCountin interfaceMetricsZooKeeperSource
-
incrementNoAuthCount
Description copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to NOAUTH Exception.- Specified by:
incrementNoAuthCountin interfaceMetricsZooKeeperSource
-
incrementOperationTimeoutCount
Description copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to an OPERATIONTIMEOUT Exception.- Specified by:
incrementOperationTimeoutCountin interfaceMetricsZooKeeperSource
-
incrementRuntimeInconsistencyCount
Description copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to RUNTIMEINCONSISTENCY Exception.- Specified by:
incrementRuntimeInconsistencyCountin interfaceMetricsZooKeeperSource
-
incrementSessionExpiredCount
Description copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to a SESSIONEXPIRED Exception.- Specified by:
incrementSessionExpiredCountin interfaceMetricsZooKeeperSource
-
incrementSystemErrorCount
Description copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to a SYSTEMERROR Exception.- Specified by:
incrementSystemErrorCountin interfaceMetricsZooKeeperSource
-
incrementTotalFailedZKCalls
Description copied from interface:MetricsZooKeeperSourceRecord the total number of failed ZooKeeper API calls.- Specified by:
incrementTotalFailedZKCallsin interfaceMetricsZooKeeperSource
-
recordReadOperationLatency
Description copied from interface:MetricsZooKeeperSourceRecord the latency incurred for read operations.- Specified by:
recordReadOperationLatencyin interfaceMetricsZooKeeperSource
-
recordWriteOperationLatency
Description copied from interface:MetricsZooKeeperSourceRecord the latency incurred for write operations.- Specified by:
recordWriteOperationLatencyin interfaceMetricsZooKeeperSource
-
recordSyncOperationLatency
Description copied from interface:MetricsZooKeeperSourceRecord the latency incurred for sync operations.- Specified by:
recordSyncOperationLatencyin interfaceMetricsZooKeeperSource
-