public class Metrics extends Object
Modifier and Type | Method and Description |
---|---|
static com.codahale.metrics.Counter |
getOrCreateCounter(String name)
Get an existing counter or create a new one if the requested one does not yet exist.
|
static AtomicInteger |
getOrCreateGauge(String name)
Get the AtomicInteger behind an existing gauge, or create a new gauge if it does not already
exist.
|
static com.codahale.metrics.Timer |
getOrCreateTimer(String name)
Get an existing timer or create a new one if the requested one does not yet exist.
|
static com.codahale.metrics.MetricRegistry |
getRegistry() |
static Metrics |
initialize(org.apache.hadoop.conf.Configuration conf) |
static void |
shutdown() |
public static Metrics initialize(org.apache.hadoop.conf.Configuration conf)
public static com.codahale.metrics.MetricRegistry getRegistry()
public static void shutdown()
public static com.codahale.metrics.Counter getOrCreateCounter(String name)
name
- name of the counterpublic static com.codahale.metrics.Timer getOrCreateTimer(String name)
name
- timer namepublic static AtomicInteger getOrCreateGauge(String name)
name
- Name of gauge. This should come from MetricConstantsCopyright © 2022 The Apache Software Foundation. All rights reserved.