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 SummaryFieldsModifier 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.BaseSourceImplmetricsAdapter, metricsContext, metricsDescription, metricsJmxContext, metricsName, metricsRegistry, registryFields inherited from interface org.apache.hadoop.hbase.metrics.BaseSourceHBASE_METRICS_SYSTEM_NAMEFields inherited from interface org.apache.hadoop.hbase.zookeeper.MetricsZooKeeperSourceEXCEPTION_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 SummaryConstructorsConstructorDescriptionMetricsZooKeeperSourceImpl(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext) 
- 
Method SummaryModifier 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.BaseSourceImpldecGauge, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, getMetricsRegistry, incCounters, incGauge, init, removeMetric, setGauge, updateHistogramMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.metrics.BaseSourcedecGauge, 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- 
MetricsZooKeeperSourceImplpublic MetricsZooKeeperSourceImpl()
- 
MetricsZooKeeperSourceImplpublic MetricsZooKeeperSourceImpl(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext) 
 
- 
- 
Method Details- 
getMetrics- Specified by:
- getMetricsin interface- org.apache.hadoop.metrics2.MetricsSource
- Overrides:
- getMetricsin class- BaseSourceImpl
 
- 
clearZKExceptionMetrics
- 
clearMetricIfNotNull
- 
incrementAuthFailedCountDescription copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to AUTHFAILED Exception.- Specified by:
- incrementAuthFailedCountin interface- MetricsZooKeeperSource
 
- 
incrementConnectionLossCountDescription copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to a CONNECTIONLOSS Exception.- Specified by:
- incrementConnectionLossCountin interface- MetricsZooKeeperSource
 
- 
incrementDataInconsistencyCountDescription copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to a DATAINCONSISTENCY Exception.- Specified by:
- incrementDataInconsistencyCountin interface- MetricsZooKeeperSource
 
- 
incrementInvalidACLCountDescription copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to INVALIDACL Exception.- Specified by:
- incrementInvalidACLCountin interface- MetricsZooKeeperSource
 
- 
incrementNoAuthCountDescription copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to NOAUTH Exception.- Specified by:
- incrementNoAuthCountin interface- MetricsZooKeeperSource
 
- 
incrementOperationTimeoutCountDescription copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to an OPERATIONTIMEOUT Exception.- Specified by:
- incrementOperationTimeoutCountin interface- MetricsZooKeeperSource
 
- 
incrementRuntimeInconsistencyCountDescription copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to RUNTIMEINCONSISTENCY Exception.- Specified by:
- incrementRuntimeInconsistencyCountin interface- MetricsZooKeeperSource
 
- 
incrementSessionExpiredCountDescription copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to a SESSIONEXPIRED Exception.- Specified by:
- incrementSessionExpiredCountin interface- MetricsZooKeeperSource
 
- 
incrementSystemErrorCountDescription copied from interface:MetricsZooKeeperSourceIncrement the count of failed ops due to a SYSTEMERROR Exception.- Specified by:
- incrementSystemErrorCountin interface- MetricsZooKeeperSource
 
- 
incrementTotalFailedZKCallsDescription copied from interface:MetricsZooKeeperSourceRecord the total number of failed ZooKeeper API calls.- Specified by:
- incrementTotalFailedZKCallsin interface- MetricsZooKeeperSource
 
- 
recordReadOperationLatencyDescription copied from interface:MetricsZooKeeperSourceRecord the latency incurred for read operations.- Specified by:
- recordReadOperationLatencyin interface- MetricsZooKeeperSource
 
- 
recordWriteOperationLatencyDescription copied from interface:MetricsZooKeeperSourceRecord the latency incurred for write operations.- Specified by:
- recordWriteOperationLatencyin interface- MetricsZooKeeperSource
 
- 
recordSyncOperationLatencyDescription copied from interface:MetricsZooKeeperSourceRecord the latency incurred for sync operations.- Specified by:
- recordSyncOperationLatencyin interface- MetricsZooKeeperSource
 
 
-