Package org.apache.hadoop.hbase.rest
Class MetricsRESTSourceImpl
java.lang.Object
org.apache.hadoop.hbase.metrics.BaseSourceImpl
org.apache.hadoop.hbase.rest.MetricsRESTSourceImpl
- All Implemented Interfaces:
BaseSource
,JvmPauseMonitorSource
,MetricsRESTSource
,org.apache.hadoop.metrics2.MetricsSource
Hadoop Two implementation of a metrics2 source that will export metrics from the Rest server to
the hadoop metrics2 subsystem. Implements BaseSource through BaseSourceImpl, following the
pattern
-
Field Summary
Modifier and TypeFieldDescriptionprivate MutableFastCounter
private MutableFastCounter
private MutableFastCounter
private MutableFastCounter
private MutableFastCounter
private MutableFastCounter
private final MutableFastCounter
private final MetricHistogram
private final MetricHistogram
private MutableFastCounter
private MutableFastCounter
private MutableFastCounter
private MutableFastCounter
private MutableFastCounter
private MutableFastCounter
private MutableFastCounter
private final MutableFastCounter
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.metrics.JvmPauseMonitorSource
INFO_THRESHOLD_COUNT_DESC, INFO_THRESHOLD_COUNT_KEY, PAUSE_TIME_WITH_GC_DESC, PAUSE_TIME_WITH_GC_KEY, PAUSE_TIME_WITHOUT_GC_DESC, PAUSE_TIME_WITHOUT_GC_KEY, WARN_THRESHOLD_COUNT_DESC, WARN_THRESHOLD_COUNT_KEY
Fields inherited from interface org.apache.hadoop.hbase.rest.MetricsRESTSource
CONTEXT, FAILED_APPEND_KEY, FAILED_DELETE_KEY, FAILED_GET_KEY, FAILED_INCREMENT_KEY, FAILED_PUT_KEY, FAILED_SCAN_KEY, JMX_CONTEXT, METRICS_DESCRIPTION, METRICS_NAME, REQUEST_KEY, SUCCESSFUL_APPEND_KEY, SUCCESSFUL_DELETE_KEY, SUCCESSFUL_GET_KEY, SUCCESSFUL_INCREMENT_KEY, SUCCESSFUL_PUT_KEY, SUCCESSFUL_SCAN_KEY
-
Constructor Summary
ConstructorDescriptionMetricsRESTSourceImpl
(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext) -
Method Summary
Modifier and TypeMethodDescriptionvoid
incInfoThresholdExceeded
(int count) Increment the INFO level threshold exceeded countvoid
incrementFailedAppendRequests
(int inc) Increment the number failed append requests.void
incrementFailedDeleteRequests
(int inc) Increment the number of failed Delete requests.void
incrementFailedGetRequests
(int inc) Increment the number of failed Get requests.void
incrementFailedIncrementRequests
(int inc) Increment the number failed increment requests.void
incrementFailedPutRequests
(int inc) Increment the number of failed Put Requests.void
incrementFailedScanRequests
(int inc) Increment the number failed scan requests.void
incrementRequests
(int inc) Increment the number of requestsvoid
incrementSucessfulAppendRequests
(int inc) Increment the number of successful append requests.void
incrementSucessfulDeleteRequests
(int inc) Increment the number of successful Delete requests.void
incrementSucessfulGetRequests
(int inc) Increment the number of successful Get requests.void
incrementSucessfulIncrementRequests
(int inc) Increment the number of successful increment requests.void
incrementSucessfulPutRequests
(int inc) Increment the number of successful Put requests.void
incrementSucessfulScanRequests
(int inc) Increment the number of successful scan requests.void
incWarnThresholdExceeded
(int count) Increment the WARN level threshold exceeded countvoid
init()
Clear out the metrics and re-prepare the source.void
updatePauseTimeWithGc
(long t) Update the pause time histogram where GC activity was detected.void
updatePauseTimeWithoutGc
(long t) Update the pause time histogram where GC activity was not detected.Methods inherited from class org.apache.hadoop.hbase.metrics.BaseSourceImpl
decGauge, getMetrics, 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
-
request
-
sucGet
-
sucPut
-
sucDel
-
sucScan
-
sucAppend
-
sucIncrement
-
fGet
-
fPut
-
fDel
-
fScan
-
fAppend
-
fIncrement
-
infoPauseThresholdExceeded
-
warnPauseThresholdExceeded
-
pausesWithGc
-
pausesWithoutGc
-
-
Constructor Details
-
MetricsRESTSourceImpl
public MetricsRESTSourceImpl() -
MetricsRESTSourceImpl
public MetricsRESTSourceImpl(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext)
-
-
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
-
incrementRequests
Description copied from interface:MetricsRESTSource
Increment the number of requests- Specified by:
incrementRequests
in interfaceMetricsRESTSource
- Parameters:
inc
- Ammount to increment by
-
incrementSucessfulGetRequests
Description copied from interface:MetricsRESTSource
Increment the number of successful Get requests.- Specified by:
incrementSucessfulGetRequests
in interfaceMetricsRESTSource
- Parameters:
inc
- Number of successful get requests.
-
incrementSucessfulPutRequests
Description copied from interface:MetricsRESTSource
Increment the number of successful Put requests.- Specified by:
incrementSucessfulPutRequests
in interfaceMetricsRESTSource
- Parameters:
inc
- Number of successful put requests.
-
incrementSucessfulDeleteRequests
Description copied from interface:MetricsRESTSource
Increment the number of successful Delete requests.- Specified by:
incrementSucessfulDeleteRequests
in interfaceMetricsRESTSource
- Parameters:
inc
- number of successful delete requests
-
incrementFailedGetRequests
Description copied from interface:MetricsRESTSource
Increment the number of failed Get requests.- Specified by:
incrementFailedGetRequests
in interfaceMetricsRESTSource
- Parameters:
inc
- The number of failed Get Requests.
-
incrementFailedPutRequests
Description copied from interface:MetricsRESTSource
Increment the number of failed Put Requests.- Specified by:
incrementFailedPutRequests
in interfaceMetricsRESTSource
- Parameters:
inc
- Number of failed Put requests.
-
incrementFailedDeleteRequests
Description copied from interface:MetricsRESTSource
Increment the number of failed Delete requests.- Specified by:
incrementFailedDeleteRequests
in interfaceMetricsRESTSource
- Parameters:
inc
- The number of failed delete requests.
-
incrementSucessfulScanRequests
Description copied from interface:MetricsRESTSource
Increment the number of successful scan requests.- Specified by:
incrementSucessfulScanRequests
in interfaceMetricsRESTSource
- Parameters:
inc
- Number of successful scan requests.
-
incrementFailedScanRequests
Description copied from interface:MetricsRESTSource
Increment the number failed scan requests.- Specified by:
incrementFailedScanRequests
in interfaceMetricsRESTSource
- Parameters:
inc
- Number of failed scan requests.
-
incrementSucessfulAppendRequests
Description copied from interface:MetricsRESTSource
Increment the number of successful append requests.- Specified by:
incrementSucessfulAppendRequests
in interfaceMetricsRESTSource
- Parameters:
inc
- Number of successful append requests.
-
incrementFailedAppendRequests
Description copied from interface:MetricsRESTSource
Increment the number failed append requests.- Specified by:
incrementFailedAppendRequests
in interfaceMetricsRESTSource
- Parameters:
inc
- Number of failed append requests.
-
incrementSucessfulIncrementRequests
Description copied from interface:MetricsRESTSource
Increment the number of successful increment requests.- Specified by:
incrementSucessfulIncrementRequests
in interfaceMetricsRESTSource
- Parameters:
inc
- Number of successful increment requests.
-
incrementFailedIncrementRequests
Description copied from interface:MetricsRESTSource
Increment the number failed increment requests.- Specified by:
incrementFailedIncrementRequests
in interfaceMetricsRESTSource
- Parameters:
inc
- Number of failed increment requests.
-
incInfoThresholdExceeded
Description copied from interface:JvmPauseMonitorSource
Increment the INFO level threshold exceeded count- Specified by:
incInfoThresholdExceeded
in interfaceJvmPauseMonitorSource
- Parameters:
count
- the count
-
incWarnThresholdExceeded
Description copied from interface:JvmPauseMonitorSource
Increment the WARN level threshold exceeded count- Specified by:
incWarnThresholdExceeded
in interfaceJvmPauseMonitorSource
- Parameters:
count
- the count
-
updatePauseTimeWithGc
Description copied from interface:JvmPauseMonitorSource
Update the pause time histogram where GC activity was detected.- Specified by:
updatePauseTimeWithGc
in interfaceJvmPauseMonitorSource
- Parameters:
t
- time it took
-
updatePauseTimeWithoutGc
Description copied from interface:JvmPauseMonitorSource
Update the pause time histogram where GC activity was not detected.- Specified by:
updatePauseTimeWithoutGc
in interfaceJvmPauseMonitorSource
- Parameters:
t
- time it took
-