org.apache.hadoop.hbase.rest
Class MetricsRESTSourceImpl

java.lang.Object
  extended by org.apache.hadoop.hbase.metrics.BaseSourceImpl
      extended by org.apache.hadoop.hbase.rest.MetricsRESTSourceImpl
All Implemented Interfaces:
BaseSource, JvmPauseMonitorSource, MetricsRESTSource, org.apache.hadoop.metrics2.MetricsSource

public class MetricsRESTSourceImpl
extends BaseSourceImpl
implements MetricsRESTSource

Hadoop One 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
 
Fields inherited from class org.apache.hadoop.hbase.metrics.BaseSourceImpl
metricsContext, metricsDescription, metricsJmxContext, metricsName, metricsRegistry
 
Fields inherited from interface org.apache.hadoop.hbase.rest.MetricsRESTSource
CONTEXT, FAILED_DELETE_KEY, FAILED_GET_KEY, FAILED_PUT_KEY, FAILED_SCAN_KEY, JMX_CONTEXT, METRICS_DESCRIPTION, METRICS_NAME, REQUEST_KEY, SUCCESSFUL_DELETE_KEY, SUCCESSFUL_GET_KEY, SUCCESSFUL_PUT_KEY, SUCCESSFUL_SCAN_KEY
 
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
 
Constructor Summary
MetricsRESTSourceImpl()
           
MetricsRESTSourceImpl(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext)
           
 
Method Summary
 void incInfoThresholdExceeded(int count)
          Increment the INFO level threshold exceeded count
 void incrementFailedDeleteRequests(int inc)
          Increment the number of failed Delete requests.
 void incrementFailedGetRequests(int inc)
          Increment the number of failed Get 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 requests
 void incrementSucessfulDeleteRequests(int inc)
          Increment the number of successful Delete requests.
 void incrementSucessfulGetRequests(int inc)
          Increment the number of successful Get 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 count
 void 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, updateQuantile
 
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, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, incCounters, incGauge, removeMetric, setGauge, updateHistogram, updateQuantile
 

Constructor Detail

MetricsRESTSourceImpl

public MetricsRESTSourceImpl()

MetricsRESTSourceImpl

public MetricsRESTSourceImpl(String metricsName,
                             String metricsDescription,
                             String metricsContext,
                             String metricsJmxContext)
Method Detail

init

public void init()
Description copied from interface: BaseSource
Clear out the metrics and re-prepare the source.

Specified by:
init in interface BaseSource
Overrides:
init in class BaseSourceImpl

incrementRequests

public void incrementRequests(int inc)
Description copied from interface: MetricsRESTSource
Increment the number of requests

Specified by:
incrementRequests in interface MetricsRESTSource
Parameters:
inc - Ammount to increment by

incrementSucessfulGetRequests

public void incrementSucessfulGetRequests(int inc)
Description copied from interface: MetricsRESTSource
Increment the number of successful Get requests.

Specified by:
incrementSucessfulGetRequests in interface MetricsRESTSource
Parameters:
inc - Number of successful get requests.

incrementSucessfulPutRequests

public void incrementSucessfulPutRequests(int inc)
Description copied from interface: MetricsRESTSource
Increment the number of successful Put requests.

Specified by:
incrementSucessfulPutRequests in interface MetricsRESTSource
Parameters:
inc - Number of successful put requests.

incrementSucessfulDeleteRequests

public void incrementSucessfulDeleteRequests(int inc)
Description copied from interface: MetricsRESTSource
Increment the number of successful Delete requests.

Specified by:
incrementSucessfulDeleteRequests in interface MetricsRESTSource

incrementFailedGetRequests

public void incrementFailedGetRequests(int inc)
Description copied from interface: MetricsRESTSource
Increment the number of failed Get requests.

Specified by:
incrementFailedGetRequests in interface MetricsRESTSource
Parameters:
inc - The number of failed Get Requests.

incrementFailedPutRequests

public void incrementFailedPutRequests(int inc)
Description copied from interface: MetricsRESTSource
Increment the number of failed Put Requests.

Specified by:
incrementFailedPutRequests in interface MetricsRESTSource
Parameters:
inc - Number of failed Put requests.

incrementFailedDeleteRequests

public void incrementFailedDeleteRequests(int inc)
Description copied from interface: MetricsRESTSource
Increment the number of failed Delete requests.

Specified by:
incrementFailedDeleteRequests in interface MetricsRESTSource
Parameters:
inc - The number of failed delete requests.

incrementSucessfulScanRequests

public void incrementSucessfulScanRequests(int inc)
Description copied from interface: MetricsRESTSource
Increment the number of successful scan requests.

Specified by:
incrementSucessfulScanRequests in interface MetricsRESTSource
Parameters:
inc - Number of successful scan requests.

incrementFailedScanRequests

public void incrementFailedScanRequests(int inc)
Description copied from interface: MetricsRESTSource
Increment the number failed scan requests.

Specified by:
incrementFailedScanRequests in interface MetricsRESTSource
Parameters:
inc - the inc

incInfoThresholdExceeded

public void incInfoThresholdExceeded(int count)
Description copied from interface: JvmPauseMonitorSource
Increment the INFO level threshold exceeded count

Specified by:
incInfoThresholdExceeded in interface JvmPauseMonitorSource
Parameters:
count - the count

incWarnThresholdExceeded

public void incWarnThresholdExceeded(int count)
Description copied from interface: JvmPauseMonitorSource
Increment the WARN level threshold exceeded count

Specified by:
incWarnThresholdExceeded in interface JvmPauseMonitorSource
Parameters:
count - the count

updatePauseTimeWithGc

public void updatePauseTimeWithGc(long t)
Description copied from interface: JvmPauseMonitorSource
Update the pause time histogram where GC activity was detected.

Specified by:
updatePauseTimeWithGc in interface JvmPauseMonitorSource
Parameters:
t - time it took

updatePauseTimeWithoutGc

public void updatePauseTimeWithoutGc(long t)
Description copied from interface: JvmPauseMonitorSource
Update the pause time histogram where GC activity was not detected.

Specified by:
updatePauseTimeWithoutGc in interface JvmPauseMonitorSource
Parameters:
t - time it took


Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.