org.apache.hadoop.hbase.thrift
Class MetricsThriftServerSourceImpl

java.lang.Object
  extended by org.apache.hadoop.hbase.metrics.BaseSourceImpl
      extended by org.apache.hadoop.hbase.thrift.MetricsThriftServerSourceImpl
All Implemented Interfaces:
BaseSource, JvmPauseMonitorSource, MetricsThriftServerSource, org.apache.hadoop.metrics2.MetricsSource

public class MetricsThriftServerSourceImpl
extends BaseSourceImpl
implements MetricsThriftServerSource

Hadoop 1 version of MetricsThriftServerSourceMetricsThriftServerSource 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.thrift.MetricsThriftServerSource
BATCH_GET_KEY, BATCH_MUTATE_KEY, CALL_QUEUE_LEN_KEY, SLOW_THRIFT_CALL_KEY, THRIFT_CALL_KEY, TIME_IN_QUEUE_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
MetricsThriftServerSourceImpl(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext)
           
 
Method Summary
 void incCall(long time)
          Add how long a call took
 void incInfoThresholdExceeded(int count)
          Increment the INFO level threshold exceeded count
 void incMethodTime(String name, long time)
          Add how long a method took
 void incNumRowKeysInBatchGet(int diff)
          Add how many keys were in a batch get.
 void incNumRowKeysInBatchMutate(int diff)
          Add how many keys were in a batch mutate.
 void incSlowCall(long time)
          Increment how long a slow call took.
 void incTimeInQueue(long time)
          Add how long an operation was in the queue.
 void incWarnThresholdExceeded(int count)
          Increment the WARN level threshold exceeded count
 void init()
          Clear out the metrics and re-prepare the source.
 void setCallQueueLen(int len)
          Set the call queue length.
 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

MetricsThriftServerSourceImpl

public MetricsThriftServerSourceImpl(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

incTimeInQueue

public void incTimeInQueue(long time)
Description copied from interface: MetricsThriftServerSource
Add how long an operation was in the queue.

Specified by:
incTimeInQueue in interface MetricsThriftServerSource

setCallQueueLen

public void setCallQueueLen(int len)
Description copied from interface: MetricsThriftServerSource
Set the call queue length.

Specified by:
setCallQueueLen in interface MetricsThriftServerSource
Parameters:
len - Time

incNumRowKeysInBatchGet

public void incNumRowKeysInBatchGet(int diff)
Description copied from interface: MetricsThriftServerSource
Add how many keys were in a batch get.

Specified by:
incNumRowKeysInBatchGet in interface MetricsThriftServerSource
Parameters:
diff - Num Keys

incNumRowKeysInBatchMutate

public void incNumRowKeysInBatchMutate(int diff)
Description copied from interface: MetricsThriftServerSource
Add how many keys were in a batch mutate.

Specified by:
incNumRowKeysInBatchMutate in interface MetricsThriftServerSource
Parameters:
diff - Num Keys

incMethodTime

public void incMethodTime(String name,
                          long time)
Description copied from interface: MetricsThriftServerSource
Add how long a method took

Specified by:
incMethodTime in interface MetricsThriftServerSource
Parameters:
name - Method name
time - Time

incCall

public void incCall(long time)
Description copied from interface: MetricsThriftServerSource
Add how long a call took

Specified by:
incCall in interface MetricsThriftServerSource
Parameters:
time - Time

incSlowCall

public void incSlowCall(long time)
Description copied from interface: MetricsThriftServerSource
Increment how long a slow call took.

Specified by:
incSlowCall in interface MetricsThriftServerSource
Parameters:
time - Time

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.