org.apache.hadoop.hbase.master
Class MetricsMasterSourceImpl

java.lang.Object
  extended by org.apache.hadoop.hbase.metrics.BaseSourceImpl
      extended by org.apache.hadoop.hbase.master.MetricsMasterSourceImpl
All Implemented Interfaces:
MetricsMasterSource, BaseSource, org.apache.hadoop.metrics2.MetricsSource

public class MetricsMasterSourceImpl
extends BaseSourceImpl
implements MetricsMasterSource

Hadoop2 implementation of MetricsMasterSource. 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.master.MetricsMasterSource
AVERAGE_LOAD_DESC, AVERAGE_LOAD_NAME, CLUSTER_ID_DESC, CLUSTER_ID_NAME, CLUSTER_REQUESTS_NAME, IS_ACTIVE_MASTER_DESC, IS_ACTIVE_MASTER_NAME, MASTER_ACTIVE_TIME_DESC, MASTER_ACTIVE_TIME_NAME, MASTER_START_TIME_DESC, MASTER_START_TIME_NAME, META_SPLIT_SIZE_DESC, META_SPLIT_SIZE_NAME, META_SPLIT_TIME_DESC, META_SPLIT_TIME_NAME, METRICS_CONTEXT, METRICS_DESCRIPTION, METRICS_JMX_CONTEXT, METRICS_NAME, NUM_DEAD_REGION_SERVERS_NAME, NUM_REGION_SERVERS_NAME, NUMBER_OF_DEAD_REGION_SERVERS_DESC, NUMBER_OF_REGION_SERVERS_DESC, RIT_COUNT_NAME, RIT_COUNT_OVER_THRESHOLD_NAME, RIT_OLDEST_AGE_NAME, SERVER_NAME_DESC, SERVER_NAME_NAME, SNAPSHOT_CLONE_TIME_DESC, SNAPSHOT_CLONE_TIME_NAME, SNAPSHOT_RESTORE_TIME_DESC, SNAPSHOT_RESTORE_TIME_NAME, SNAPSHOT_TIME_DESC, SNAPSHOT_TIME_NAME, SPLIT_SIZE_DESC, SPLIT_SIZE_NAME, SPLIT_TIME_DESC, SPLIT_TIME_NAME, ZOOKEEPER_QUORUM_DESC, ZOOKEEPER_QUORUM_NAME
 
Fields inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
HBASE_METRICS_SYSTEM_NAME
 
Constructor Summary
MetricsMasterSourceImpl(MetricsMasterWrapper masterWrapper)
           
MetricsMasterSourceImpl(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext, MetricsMasterWrapper masterWrapper)
           
 
Method Summary
 void getMetrics(org.apache.hadoop.metrics2.MetricsCollector metricsCollector, boolean all)
           
 void incRequests(int inc)
          Increment the number of requests the cluster has seen.
 void init()
          Clear out the metrics and re-prepare the source.
 void setRIT(int ritCount)
          Set the number of regions in transition.
 void setRITCountOverThreshold(int ritCount)
          Set the count of the number of regions that have been in transition over the threshold time.
 void setRITOldestAge(long ritCount)
          Set the oldest region in transition.
 void updateMetaWALSplitSize(long size)
           
 void updateMetaWALSplitTime(long time)
           
 void updateSnapshotCloneTime(long time)
           
 void updateSnapshotRestoreTime(long time)
           
 void updateSnapshotTime(long time)
           
 void updateSplitSize(long size)
           
 void updateSplitTime(long time)
           
 
Methods inherited from class org.apache.hadoop.hbase.metrics.BaseSourceImpl
decGauge, 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

MetricsMasterSourceImpl

public MetricsMasterSourceImpl(MetricsMasterWrapper masterWrapper)

MetricsMasterSourceImpl

public MetricsMasterSourceImpl(String metricsName,
                               String metricsDescription,
                               String metricsContext,
                               String metricsJmxContext,
                               MetricsMasterWrapper masterWrapper)
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

incRequests

public void incRequests(int inc)
Description copied from interface: MetricsMasterSource
Increment the number of requests the cluster has seen.

Specified by:
incRequests in interface MetricsMasterSource
Parameters:
inc - Ammount to increment the total by.

setRIT

public void setRIT(int ritCount)
Description copied from interface: MetricsMasterSource
Set the number of regions in transition.

Specified by:
setRIT in interface MetricsMasterSource
Parameters:
ritCount - count of the regions in transition.

setRITCountOverThreshold

public void setRITCountOverThreshold(int ritCount)
Description copied from interface: MetricsMasterSource
Set the count of the number of regions that have been in transition over the threshold time.

Specified by:
setRITCountOverThreshold in interface MetricsMasterSource
Parameters:
ritCount - number of regions in transition for longer than threshold.

setRITOldestAge

public void setRITOldestAge(long ritCount)
Description copied from interface: MetricsMasterSource
Set the oldest region in transition.

Specified by:
setRITOldestAge in interface MetricsMasterSource
Parameters:
ritCount - age of the oldest RIT.

updateSplitTime

public void updateSplitTime(long time)
Specified by:
updateSplitTime in interface MetricsMasterSource

updateSplitSize

public void updateSplitSize(long size)
Specified by:
updateSplitSize in interface MetricsMasterSource

updateSnapshotTime

public void updateSnapshotTime(long time)
Specified by:
updateSnapshotTime in interface MetricsMasterSource

updateSnapshotCloneTime

public void updateSnapshotCloneTime(long time)
Specified by:
updateSnapshotCloneTime in interface MetricsMasterSource

updateSnapshotRestoreTime

public void updateSnapshotRestoreTime(long time)
Specified by:
updateSnapshotRestoreTime in interface MetricsMasterSource

updateMetaWALSplitTime

public void updateMetaWALSplitTime(long time)
Specified by:
updateMetaWALSplitTime in interface MetricsMasterSource

updateMetaWALSplitSize

public void updateMetaWALSplitSize(long size)
Specified by:
updateMetaWALSplitSize in interface MetricsMasterSource

getMetrics

public void getMetrics(org.apache.hadoop.metrics2.MetricsCollector metricsCollector,
                       boolean all)
Specified by:
getMetrics in interface org.apache.hadoop.metrics2.MetricsSource
Overrides:
getMetrics in class BaseSourceImpl


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