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
Modifier and TypeFieldDescriptionprivate final org.apache.hadoop.metrics2.lib.MutableGaugeLong
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong
private MutableHistogram
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong
private MutableHistogram
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong
private MutableHistogram
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.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
ConstructorDescriptionMetricsZooKeeperSourceImpl
(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext) -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
clearMetricIfNotNull
(org.apache.hadoop.metrics2.lib.MutableGaugeLong metric) private void
void
getMetrics
(org.apache.hadoop.metrics2.MetricsCollector metricsCollector, boolean all) void
Increment the count of failed ops due to AUTHFAILED Exception.void
Increment the count of failed ops due to a CONNECTIONLOSS Exception.void
Increment the count of failed ops due to a DATAINCONSISTENCY Exception.void
Increment the count of failed ops due to INVALIDACL Exception.void
Increment the count of failed ops due to NOAUTH Exception.void
Increment the count of failed ops due to an OPERATIONTIMEOUT Exception.void
Increment the count of failed ops due to RUNTIMEINCONSISTENCY Exception.void
Increment the count of failed ops due to a SESSIONEXPIRED Exception.void
Increment the count of failed ops due to a SYSTEMERROR Exception.void
Record the total number of failed ZooKeeper API calls.void
recordReadOperationLatency
(long latency) Record the latency incurred for read operations.void
recordSyncOperationLatency
(long latency) Record the latency incurred for sync operations.void
recordWriteOperationLatency
(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, 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, 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:
getMetrics
in interfaceorg.apache.hadoop.metrics2.MetricsSource
- Overrides:
getMetrics
in classBaseSourceImpl
-
clearZKExceptionMetrics
-
clearMetricIfNotNull
-
incrementAuthFailedCount
Description copied from interface:MetricsZooKeeperSource
Increment the count of failed ops due to AUTHFAILED Exception.- Specified by:
incrementAuthFailedCount
in interfaceMetricsZooKeeperSource
-
incrementConnectionLossCount
Description copied from interface:MetricsZooKeeperSource
Increment the count of failed ops due to a CONNECTIONLOSS Exception.- Specified by:
incrementConnectionLossCount
in interfaceMetricsZooKeeperSource
-
incrementDataInconsistencyCount
Description copied from interface:MetricsZooKeeperSource
Increment the count of failed ops due to a DATAINCONSISTENCY Exception.- Specified by:
incrementDataInconsistencyCount
in interfaceMetricsZooKeeperSource
-
incrementInvalidACLCount
Description copied from interface:MetricsZooKeeperSource
Increment the count of failed ops due to INVALIDACL Exception.- Specified by:
incrementInvalidACLCount
in interfaceMetricsZooKeeperSource
-
incrementNoAuthCount
Description copied from interface:MetricsZooKeeperSource
Increment the count of failed ops due to NOAUTH Exception.- Specified by:
incrementNoAuthCount
in interfaceMetricsZooKeeperSource
-
incrementOperationTimeoutCount
Description copied from interface:MetricsZooKeeperSource
Increment the count of failed ops due to an OPERATIONTIMEOUT Exception.- Specified by:
incrementOperationTimeoutCount
in interfaceMetricsZooKeeperSource
-
incrementRuntimeInconsistencyCount
Description copied from interface:MetricsZooKeeperSource
Increment the count of failed ops due to RUNTIMEINCONSISTENCY Exception.- Specified by:
incrementRuntimeInconsistencyCount
in interfaceMetricsZooKeeperSource
-
incrementSessionExpiredCount
Description copied from interface:MetricsZooKeeperSource
Increment the count of failed ops due to a SESSIONEXPIRED Exception.- Specified by:
incrementSessionExpiredCount
in interfaceMetricsZooKeeperSource
-
incrementSystemErrorCount
Description copied from interface:MetricsZooKeeperSource
Increment the count of failed ops due to a SYSTEMERROR Exception.- Specified by:
incrementSystemErrorCount
in interfaceMetricsZooKeeperSource
-
incrementTotalFailedZKCalls
Description copied from interface:MetricsZooKeeperSource
Record the total number of failed ZooKeeper API calls.- Specified by:
incrementTotalFailedZKCalls
in interfaceMetricsZooKeeperSource
-
recordReadOperationLatency
Description copied from interface:MetricsZooKeeperSource
Record the latency incurred for read operations.- Specified by:
recordReadOperationLatency
in interfaceMetricsZooKeeperSource
-
recordWriteOperationLatency
Description copied from interface:MetricsZooKeeperSource
Record the latency incurred for write operations.- Specified by:
recordWriteOperationLatency
in interfaceMetricsZooKeeperSource
-
recordSyncOperationLatency
Description copied from interface:MetricsZooKeeperSource
Record the latency incurred for sync operations.- Specified by:
recordSyncOperationLatency
in interfaceMetricsZooKeeperSource
-