use of org.apache.oozie.util.MetricsInstrumentation in project oozie by apache.
the class MetricsInstrumentationService method init.
/**
* Initialize the metrics instrumentation service.
*
* @param services services instance.
* @throws org.apache.oozie.service.ServiceException
*/
@Override
public void init(Services services) throws ServiceException {
final MetricsInstrumentation instr = new MetricsInstrumentation();
int interval = services.getConf().getInt(CONF_LOGGING_INTERVAL, 60);
initLogging(services, instr, interval);
instrumentation = instr;
isEnabled = true;
}
use of org.apache.oozie.util.MetricsInstrumentation in project oozie by apache.
the class TestMetricsInstrumentationService method testInstrumentation.
public void testInstrumentation() throws Exception {
assertNotNull(Services.get().get(InstrumentationService.class));
assertNotNull(Services.get().get(InstrumentationService.class).get());
Instrumentation instr = Services.get().get(InstrumentationService.class).get();
assertTrue(instr instanceof MetricsInstrumentation);
}
use of org.apache.oozie.util.MetricsInstrumentation in project oozie by apache.
the class TestInstrumentationService method testInstrumentation.
public void testInstrumentation() throws Exception {
assertNotNull(Services.get().get(InstrumentationService.class));
assertNotNull(Services.get().get(InstrumentationService.class).get());
Instrumentation instr = Services.get().get(InstrumentationService.class).get();
assertTrue("Metrics is enabled by default since 5.0.0", instr instanceof MetricsInstrumentation);
}
Aggregations