| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.oozie.util.Instrumentation
public class Instrumentation
Instrumentation framework that supports Timers, Counters, Variables and Sampler instrumentation elements.
All instrumentation elements have a group and a name.
| Nested Class Summary | |
|---|---|
| static class | Instrumentation.CronCron is a stopwatch that can be started/stopped several times. | 
| static interface | Instrumentation.Element<T>Gives access to a snapshot of an Instrumentation element (Counter, Timer). | 
| static class | Instrumentation.TimerTimer Instrumentation element. | 
| static interface | Instrumentation.Variable<T>Interface for instrumentation variables. | 
| Constructor Summary | |
|---|---|
| Instrumentation()Instrumentation constructor. | |
| Method Summary | |
|---|---|
|  void | addCron(String group,
               String name,
               Instrumentation.Cron cron)Add a cron to an instrumentation timer. | 
|  void | addSampler(String group,
                     String name,
                     int period,
                     int interval,
                     Instrumentation.Variable<Long> variable)Add a sampling variable. | 
|  void | addVariable(String group,
                       String name,
                       Instrumentation.Variable variable)Add an instrumentation variable. | 
|  Map<String,Map<String,Map<String,Object>>> | getAll()Return a map containing all variables, counters and timers. | 
|  Map<String,String> | getConfiguration()Return the current system configuration as a Map | 
|  Map<String,Map<String,Instrumentation.Element<Long>>> | getCounters()Return all the counters. | 
|  Map<String,String> | getJavaSystemProperties()Return the JVM system properties. | 
|  Map<String,String> | getOSEnv()Return the OS environment used to start Oozie. | 
|  Map<String,Map<String,Instrumentation.Element<Double>>> | getSamplers()Return all the samplers. | 
|  Map<String,Map<String,Instrumentation.Element<Instrumentation.Timer>>> | getTimers()Return all the timers. | 
|  Map<String,Map<String,Instrumentation.Element<Instrumentation.Variable>>> | getVariables()Return all the variables. | 
|  void | incr(String group,
         String name,
         long count)Increment an instrumentation counter. | 
|  void | setConfiguration(org.apache.hadoop.conf.Configuration configuration)Set the system configuration. | 
|  void | setScheduler(ScheduledExecutorService scheduler)Set the scheduler instance to handle the samplers. | 
|  String | toString()Return the string representation of the instrumentation. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public Instrumentation()
| Method Detail | 
|---|
public void setScheduler(ScheduledExecutorService scheduler)
scheduler - scheduler instance.
public void addCron(String group,
                    String name,
                    Instrumentation.Cron cron)
group - timer group.name - timer name.cron - cron to add to the timer.
public void incr(String group,
                 String name,
                 long count)
group - counter group.name - counter name.count - increment to add to the counter.
public void addVariable(String group,
                        String name,
                        Instrumentation.Variable variable)
group - counter group.name - counter name.variable - variable to add.public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
configuration - system configuration.public Map<String,String> getJavaSystemProperties()
public Map<String,String> getOSEnv()
public Map<String,String> getConfiguration()
public Map<String,Map<String,Instrumentation.Element<Long>>> getCounters()
Instrumentation.Element.getValue() is invoked.
public Map<String,Map<String,Instrumentation.Element<Instrumentation.Timer>>> getTimers()
Instrumentation.Element.getValue() is
 invoked.
public Map<String,Map<String,Instrumentation.Element<Instrumentation.Variable>>> getVariables()
Instrumentation.Element.getValue() is invoked.
public Map<String,Map<String,Map<String,Object>>> getAll()
public String toString()
toString in class Object
public void addSampler(String group,
                       String name,
                       int period,
                       int interval,
                       Instrumentation.Variable<Long> variable)
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()
Instrumentation.Element.getValue() is invoked.
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||