org.apache.hadoop.hbase.regionserver
Class MetricsRegionServerSourceImpl

java.lang.Object
  extended by org.apache.hadoop.hbase.metrics.BaseSourceImpl
      extended by org.apache.hadoop.hbase.regionserver.MetricsRegionServerSourceImpl
All Implemented Interfaces:
BaseSource, MetricsRegionServerSource, org.apache.hadoop.metrics2.MetricsSource

public class MetricsRegionServerSourceImpl
extends BaseSourceImpl
implements MetricsRegionServerSource

Hadoop1 implementation of MetricsRegionServerSource. 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.regionserver.MetricsRegionServerSource
APPEND_KEY, BLOCK_CACHE_COUNT, BLOCK_CACHE_COUNT_DESC, BLOCK_CACHE_EVICTION_COUNT, BLOCK_CACHE_EVICTION_COUNT_DESC, BLOCK_CACHE_EXPRESS_HIT_PERCENT, BLOCK_CACHE_EXPRESS_HIT_PERCENT_DESC, BLOCK_CACHE_FREE_DESC, BLOCK_CACHE_FREE_SIZE, BLOCK_CACHE_HIT_COUNT, BLOCK_CACHE_HIT_COUNT_DESC, BLOCK_CACHE_HIT_PERCENT, BLOCK_CACHE_HIT_PERCENT_DESC, BLOCK_CACHE_MISS_COUNT, BLOCK_CACHE_SIZE, BLOCK_CACHE_SIZE_DESC, BLOCK_COUNT_MISS_COUNT_DESC, CHECK_MUTATE_FAILED_COUNT, CHECK_MUTATE_FAILED_COUNT_DESC, CHECK_MUTATE_PASSED_COUNT, CHECK_MUTATE_PASSED_COUNT_DESC, CLUSTER_ID_DESC, CLUSTER_ID_NAME, COMPACTION_QUEUE_LENGTH, COMPACTION_QUEUE_LENGTH_DESC, DATA_SIZE_WITHOUT_WAL, DATA_SIZE_WITHOUT_WAL_DESC, DELETE_KEY, FLUSH_QUEUE_LENGTH, FLUSH_QUEUE_LENGTH_DESC, GET_KEY, INCREMENT_KEY, MEMSTORE_SIZE, MEMSTORE_SIZE_DESC, METRICS_CONTEXT, METRICS_DESCRIPTION, METRICS_JMX_CONTEXT, METRICS_NAME, MUTATE_KEY, NUMBER_OF_PUTS_WITHOUT_WAL, NUMBER_OF_PUTS_WITHOUT_WAL_DESC, PERCENT_FILES_LOCAL, PERCENT_FILES_LOCAL_DESC, READ_REQUEST_COUNT, READ_REQUEST_COUNT_DESC, REGION_COUNT, REGION_COUNT_DESC, RS_START_TIME_DESC, RS_START_TIME_NAME, SERVER_NAME_DESC, SERVER_NAME_NAME, SLOW_APPEND_DESC, SLOW_APPEND_KEY, SLOW_DELETE_DESC, SLOW_DELETE_KEY, SLOW_GET_DESC, SLOW_GET_KEY, SLOW_INCREMENT_DESC, SLOW_INCREMENT_KEY, SLOW_MUTATE_DESC, SLOW_MUTATE_KEY, STATIC_BLOOM_SIZE, STATIC_BLOOM_SIZE_DESC, STATIC_INDEX_SIZE, STATIC_INDEX_SIZE_DESC, STORE_COUNT, STORE_COUNT_DESC, STOREFILE_COUNT, STOREFILE_COUNT_DESC, STOREFILE_INDEX_SIZE, STOREFILE_INDEX_SIZE_DESC, STOREFILE_SIZE, STOREFILE_SIZE_DESC, TOTAL_REQUEST_COUNT, TOTAL_REQUEST_COUNT_DESC, UPDATES_BLOCKED_DESC, UPDATES_BLOCKED_TIME, WRITE_REQUEST_COUNT, WRITE_REQUEST_COUNT_DESC, ZOOKEEPER_QUORUM_DESC, ZOOKEEPER_QUORUM_NAME
 
Fields inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
HBASE_METRICS_SYSTEM_NAME
 
Constructor Summary
MetricsRegionServerSourceImpl(MetricsRegionServerWrapper rsWrap)
           
MetricsRegionServerSourceImpl(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext, MetricsRegionServerWrapper rsWrap)
           
 
Method Summary
 void getMetrics(org.apache.hadoop.metrics2.MetricsBuilder metricsBuilder, boolean all)
          Yes this is a get function that doesn't return anything.
 void incrSlowAppend()
          Increment the number of slow Appends that have happened.
 void incrSlowDelete()
          Increment the number of slow Deletes that have happened.
 void incrSlowGet()
          Increment the number of slow Gets that have happened.
 void incrSlowIncrement()
          Increment the number of slow Increments that have happened.
 void incrSlowPut()
          Increment the number of slow Puts that have happened.
 void updateAppend(long t)
          Update the Append time histogram.
 void updateDelete(long t)
          Update the Delete time histogram
 void updateGet(long t)
          Update the Get time histogram .
 void updateIncrement(long t)
          Update the Increment time histogram.
 void updatePut(long t)
          Update the Put time histogram
 
Methods inherited from class org.apache.hadoop.hbase.metrics.BaseSourceImpl
decGauge, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, getMetricsRegistry, incCounters, incGauge, init, 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, init, removeMetric, setGauge, updateHistogram, updateQuantile
 

Constructor Detail

MetricsRegionServerSourceImpl

public MetricsRegionServerSourceImpl(MetricsRegionServerWrapper rsWrap)

MetricsRegionServerSourceImpl

public MetricsRegionServerSourceImpl(String metricsName,
                                     String metricsDescription,
                                     String metricsContext,
                                     String metricsJmxContext,
                                     MetricsRegionServerWrapper rsWrap)
Method Detail

updatePut

public void updatePut(long t)
Description copied from interface: MetricsRegionServerSource
Update the Put time histogram

Specified by:
updatePut in interface MetricsRegionServerSource
Parameters:
t - time it took

updateDelete

public void updateDelete(long t)
Description copied from interface: MetricsRegionServerSource
Update the Delete time histogram

Specified by:
updateDelete in interface MetricsRegionServerSource
Parameters:
t - time it took

updateGet

public void updateGet(long t)
Description copied from interface: MetricsRegionServerSource
Update the Get time histogram .

Specified by:
updateGet in interface MetricsRegionServerSource
Parameters:
t - time it took

updateIncrement

public void updateIncrement(long t)
Description copied from interface: MetricsRegionServerSource
Update the Increment time histogram.

Specified by:
updateIncrement in interface MetricsRegionServerSource
Parameters:
t - time it took

updateAppend

public void updateAppend(long t)
Description copied from interface: MetricsRegionServerSource
Update the Append time histogram.

Specified by:
updateAppend in interface MetricsRegionServerSource
Parameters:
t - time it took

incrSlowPut

public void incrSlowPut()
Description copied from interface: MetricsRegionServerSource
Increment the number of slow Puts that have happened.

Specified by:
incrSlowPut in interface MetricsRegionServerSource

incrSlowDelete

public void incrSlowDelete()
Description copied from interface: MetricsRegionServerSource
Increment the number of slow Deletes that have happened.

Specified by:
incrSlowDelete in interface MetricsRegionServerSource

incrSlowGet

public void incrSlowGet()
Description copied from interface: MetricsRegionServerSource
Increment the number of slow Gets that have happened.

Specified by:
incrSlowGet in interface MetricsRegionServerSource

incrSlowIncrement

public void incrSlowIncrement()
Description copied from interface: MetricsRegionServerSource
Increment the number of slow Increments that have happened.

Specified by:
incrSlowIncrement in interface MetricsRegionServerSource

incrSlowAppend

public void incrSlowAppend()
Description copied from interface: MetricsRegionServerSource
Increment the number of slow Appends that have happened.

Specified by:
incrSlowAppend in interface MetricsRegionServerSource

getMetrics

public void getMetrics(org.apache.hadoop.metrics2.MetricsBuilder metricsBuilder,
                       boolean all)
Yes this is a get function that doesn't return anything. Thanks Hadoop for breaking all expectations of java programmers. Instead of returning anything Hadoop metrics expects getMetrics to push the metrics into the metricsBuilder.

Specified by:
getMetrics in interface org.apache.hadoop.metrics2.MetricsSource
Overrides:
getMetrics in class BaseSourceImpl
Parameters:
metricsBuilder - Builder to accept metrics
all - push all or only changed?


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.