Interface BaseSource

All Known Subinterfaces:
ExceptionTrackingSource, MetricsAssignmentManagerSource, MetricsBalancerSource, MetricsHBaseServerSource, MetricsHeapMemoryManagerSource, MetricsIOSource, MetricsMasterFileSystemSource, MetricsMasterProcSource, MetricsMasterQuotaSource, MetricsMasterSource, MetricsRegionAggregateSource, MetricsRegionServerQuotaSource, MetricsRegionServerSource, MetricsReplicationGlobalSourceSource, MetricsReplicationSource, MetricsReplicationSourceSource, MetricsReplicationTableSource, MetricsRESTSource, MetricsSnapshotSource, MetricsStochasticBalancerSource, MetricsTableAggregateSource, MetricsThriftServerSource, MetricsUserAggregateSource, MetricsWALEventTrackerSource, MetricsWALSource, MetricsZooKeeperSource
All Known Implementing Classes:
BaseSourceImpl, ExceptionTrackingSourceImpl, MetricsAssignmentManagerSourceImpl, MetricsBalancerSourceImpl, MetricsHBaseServerSourceImpl, MetricsHeapMemoryManagerSourceImpl, MetricsIOSourceImpl, MetricsMasterFilesystemSourceImpl, MetricsMasterProcSourceImpl, MetricsMasterQuotaSourceImpl, MetricsMasterSourceImpl, MetricsRegionAggregateSourceImpl, MetricsRegionServerQuotaSourceImpl, MetricsRegionServerSourceImpl, MetricsReplicationGlobalSourceSourceImpl, MetricsReplicationSourceImpl, MetricsReplicationSourceSourceImpl, MetricsReplicationTableSourceImpl, MetricsRESTSourceImpl, MetricsSnapshotSourceImpl, MetricsSource, MetricsStochasticBalancerSourceImpl, MetricsTableAggregateSourceImpl, MetricsThriftServerSourceImpl, MetricsUserAggregateSourceImpl, MetricsWALEventTrackerSourceImpl, MetricsWALSourceImpl, MetricsZooKeeperSourceImpl

@Private public interface BaseSource
BaseSource for dynamic metrics to announce to Metrics2. In hbase-hadoop{1|2}-compat there is an implementation of this interface.
  • Field Details

  • Method Details

    • init

      void init()
      Clear out the metrics and re-prepare the source.
    • setGauge

      void setGauge(String gaugeName, long value)
      Set a gauge to a specific value.
      Parameters:
      gaugeName - the name of the gauge
      value - the value
    • incGauge

      void incGauge(String gaugeName, long delta)
      Add some amount to a gauge.
      Parameters:
      gaugeName - the name of the gauge
      delta - the amount to change the gauge by.
    • decGauge

      void decGauge(String gaugeName, long delta)
      Subtract some amount from a gauge.
      Parameters:
      gaugeName - the name of the gauge
      delta - the amount to change the gauge by.
    • removeMetric

      void removeMetric(String key)
      Remove a metric and no longer announce it.
      Parameters:
      key - Name of the gauge to remove.
    • incCounters

      void incCounters(String counterName, long delta)
      Add some amount to a counter.
      Parameters:
      counterName - the name of the counter
      delta - the amount to change the counter by.
    • updateHistogram

      void updateHistogram(String name, long value)
      Add some value to a histogram.
      Parameters:
      name - the name of the histogram
      value - the value to add to the histogram
    • getMetricsContext

      Get the metrics context. For hadoop metrics2 system this is usually an all lowercased string. eg. regionserver, master, thriftserver
      Returns:
      The string context used to register this source to hadoop's metrics2 system.
    • getMetricsDescription

      Get the description of what this source exposes.
    • getMetricsJmxContext

      Get the name of the context in JMX that this source will be exposed through. This is in ObjectName format. With the default context being Hadoop -> HBase
    • getMetricsName

      Get the name of the metrics that are being exported by this source. Eg. IPC, GC, WAL
    • getMetricRegistryInfo