Modifier and Type | Class and Description |
---|---|
static class |
CodahaleMetrics.CodahaleMetricsScope |
Modifier and Type | Field and Description |
---|---|
static String |
ACTIVE_CALLS |
static String |
API_PREFIX |
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 |
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 |
startStoredScope(String name) |
public static final String API_PREFIX
public static final String ACTIVE_CALLS
public static final org.slf4j.Logger LOGGER
public final com.codahale.metrics.MetricRegistry metricRegistry
public void close() throws Exception
Metrics
public void startStoredScope(String name) throws IOException
startStoredScope
in interface Metrics
name
- starts a scope of a given name. Scopes is stored as thread-local variable.IOException
public void endStoredScope(String name) throws IOException
Metrics
endStoredScope
in interface Metrics
IOException
public MetricsScope getStoredScope(String name) throws IOException
IOException
public MetricsScope createScope(String name) throws IOException
Metrics
createScope
in interface Metrics
IOException
public void endScope(MetricsScope scope) throws IOException
Metrics
endScope
in interface Metrics
IOException
public Long incrementCounter(String name) throws IOException
Metrics
incrementCounter
in interface Metrics
IOException
public Long incrementCounter(String name, long increment) throws IOException
Metrics
incrementCounter
in interface Metrics
IOException
public Long decrementCounter(String name) throws IOException
Metrics
decrementCounter
in interface Metrics
IOException
public Long decrementCounter(String name, long decrement) throws IOException
Metrics
decrementCounter
in interface Metrics
IOException
public void addGauge(String name, MetricsVariable variable)
Metrics
public com.codahale.metrics.MetricRegistry getMetricRegistry()
Copyright © 2016 The Apache Software Foundation. All rights reserved.