Search in sources :

Example 1 with MetricsInstrumentation

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;
}
Also used : MetricsInstrumentation(org.apache.oozie.util.MetricsInstrumentation)

Example 2 with MetricsInstrumentation

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);
}
Also used : MetricsInstrumentation(org.apache.oozie.util.MetricsInstrumentation) Instrumentation(org.apache.oozie.util.Instrumentation) MetricsInstrumentation(org.apache.oozie.util.MetricsInstrumentation)

Example 3 with 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);
}
Also used : MetricsInstrumentation(org.apache.oozie.util.MetricsInstrumentation) Instrumentation(org.apache.oozie.util.Instrumentation) MetricsInstrumentation(org.apache.oozie.util.MetricsInstrumentation)

Aggregations

MetricsInstrumentation (org.apache.oozie.util.MetricsInstrumentation)3 Instrumentation (org.apache.oozie.util.Instrumentation)2