@Deprecated public class Instrumentation extends Object
All instrumentation elements have a group and a name.
| Modifier and Type | Class and Description |
|---|---|
static class |
Instrumentation.Counter
Deprecated.
Counter Instrumentation element.
|
static class |
Instrumentation.Cron
Deprecated.
Cron is a stopwatch that can be started/stopped several times.
|
static interface |
Instrumentation.Element<T>
Deprecated.
Gives access to a snapshot of an Instrumentation element (Counter, Timer).
|
static class |
Instrumentation.Timer
Deprecated.
Timer Instrumentation element.
|
static interface |
Instrumentation.Variable<T>
Deprecated.
Interface for instrumentation variables.
|
| Constructor and Description |
|---|
Instrumentation()
Deprecated.
Instrumentation constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCron(String group,
String name,
Instrumentation.Cron cron)
Deprecated.
Add a cron to an instrumentation timer.
|
void |
addSampler(String group,
String name,
int period,
int interval,
Instrumentation.Variable<Long> variable)
Deprecated.
Add a sampling variable.
|
void |
addVariable(String group,
String name,
Instrumentation.Variable variable)
Deprecated.
Add an instrumentation variable.
|
void |
decr(String group,
String name,
long count)
Deprecated.
Decrement an instrumentation counter.
|
Map<String,Map<String,Map<String,Object>>> |
getAll()
Deprecated.
Return a map containing all variables, counters and timers.
|
Map<String,String> |
getConfiguration()
Deprecated.
Return the current system configuration as a Map<String,String>.
|
Map<String,Map<String,Instrumentation.Element<Long>>> |
getCounters()
Deprecated.
Return all the counters.
|
Map<String,String> |
getJavaSystemProperties()
Deprecated.
Return the JVM system properties.
|
Map<String,String> |
getOSEnv()
Deprecated.
Return the OS environment used to start Oozie.
|
Map<String,Map<String,Instrumentation.Element<Double>>> |
getSamplers()
Deprecated.
Return all the samplers.
|
Map<String,Map<String,Instrumentation.Element<Instrumentation.Timer>>> |
getTimers()
Deprecated.
Return all the timers.
|
Map<String,Map<String,Instrumentation.Element<Instrumentation.Variable>>> |
getVariables()
Deprecated.
Return all the variables.
|
void |
incr(String group,
String name,
long count)
Deprecated.
Increment an instrumentation counter.
|
void |
setScheduler(ScheduledExecutorService scheduler)
Deprecated.
Set the scheduler instance to handle the samplers.
|
void |
stop()
Deprecated.
|
String |
toString()
Deprecated.
Return the string representation of the instrumentation.
|
public Instrumentation()
public void setScheduler(ScheduledExecutorService scheduler)
scheduler - scheduler instance.public void addCron(String group, String name, Instrumentation.Cron cron)
This method is thread safe.
group - timer group.name - timer name.cron - cron to add to the timer.public void incr(String group, String name, long count)
This method is thread safe.
group - counter group.name - counter name.count - increment to add to the counter.public void decr(String group, String name, long count)
This method is thread safe.
group - counter group.name - counter name.count - decrement to add to the counter.public void addVariable(String group, String name, Instrumentation.Variable variable)
This method is thread safe.
group - counter group.name - counter name.variable - variable to add.public Map<String,String> getJavaSystemProperties()
public Map<String,String> getOSEnv()
public Map<String,String> getConfiguration()
public Map<String,Map<String,Instrumentation.Element<Long>>> getCounters()
This method is thread safe.
The counters are live. The counter value is a
snapshot at the time the Instrumentation.Element.getValue() is invoked.
public Map<String,Map<String,Instrumentation.Element<Instrumentation.Timer>>> getTimers()
This method is thread safe.
The timers are live. Once a timer is obtained, all
its values are consistent (they are snapshot at the time the Instrumentation.Element.getValue() is
invoked.
public Map<String,Map<String,Instrumentation.Element<Instrumentation.Variable>>> getVariables()
This method is thread safe.
The variables are live. The variable value is a
snapshot at the time the Instrumentation.Element.getValue() is invoked.
public Map<String,Map<String,Map<String,Object>>> getAll()
public String toString()
public void addSampler(String group, String name, int period, int interval, Instrumentation.Variable<Long> variable)
This method is thread safe.
group - timer group.name - timer name.period - sampling period to compute rate.interval - sampling frequency, how often the variable is probed.variable - variable to sample.public Map<String,Map<String,Instrumentation.Element<Double>>> getSamplers()
This method is thread safe.
The samplers are live. The sampler value is a
snapshot at the time the Instrumentation.Element.getValue() is invoked.
public void stop()
Copyright © 2020 Apache Software Foundation. All rights reserved.