| Modifier and Type | Class and Description |
|---|---|
class |
CodahaleMetrics.CodahaleMetricsScope |
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOGGER |
com.codahale.metrics.MetricRegistry |
metricRegistry |
| Constructor and Description |
|---|
CodahaleMetrics(HiveConf conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGauge(String name,
MetricsVariable variable)
Adds a metrics-gauge to track variable.
|
void |
addRatio(String name,
MetricsVariable<Integer> numerator,
MetricsVariable<Integer> denominator)
Add a ratio metric to track the correlation between two variables
|
void |
close()
Deinitializes the Metrics system.
|
MetricsScope |
createScope(String name)
Create scope with given name and returns it.
|
Long |
decrementCounter(String name)
Decrements a counter of the given name by 1.
|
Long |
decrementCounter(String name,
long decrement)
Decrements a counter of the given name by "decrement"
|
String |
dumpJson() |
void |
endScope(MetricsScope scope)
Close the given scope.
|
void |
endStoredScope(String name)
Closes the stored scope of a given name.
|
com.codahale.metrics.MetricRegistry |
getMetricRegistry() |
MetricsScope |
getStoredScope(String name) |
Long |
incrementCounter(String name)
Increments a counter of the given name by 1.
|
Long |
incrementCounter(String name,
long increment)
Increments a counter of the given name by "increment"
|
void |
markMeter(String name)
Mark an event occurance for a meter.
|
void |
removeGauge(String name)
Removed the gauge added by addGauge.
|
void |
startStoredScope(String name) |
public static final org.slf4j.Logger LOGGER
public final com.codahale.metrics.MetricRegistry metricRegistry
public CodahaleMetrics(HiveConf conf)
public void close()
throws Exception
Metricspublic void startStoredScope(String name)
startStoredScope in interface Metricsname - starts a scope of a given name. Scopes is stored as thread-local variable.public void endStoredScope(String name)
MetricsendStoredScope in interface Metricspublic MetricsScope getStoredScope(String name) throws IllegalArgumentException
IllegalArgumentExceptionpublic MetricsScope createScope(String name)
MetricscreateScope in interface Metricspublic void endScope(MetricsScope scope)
Metricspublic Long incrementCounter(String name)
MetricsincrementCounter in interface Metricspublic Long incrementCounter(String name, long increment)
MetricsincrementCounter in interface Metricspublic Long decrementCounter(String name)
MetricsdecrementCounter in interface Metricspublic Long decrementCounter(String name, long decrement)
MetricsdecrementCounter in interface Metricspublic void addGauge(String name, MetricsVariable variable)
Metricspublic void removeGauge(String name)
MetricsremoveGauge in interface Metricsname - name of gaugepublic void addRatio(String name, MetricsVariable<Integer> numerator, MetricsVariable<Integer> denominator)
Metricspublic void markMeter(String name)
Metricspublic com.codahale.metrics.MetricRegistry getMetricRegistry()
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.