Search in sources :

Example 21 with SLAService

use of org.apache.oozie.sla.service.SLAService in project oozie by apache.

the class TestSLAService method testBasicService.

@Test
public void testBasicService() throws Exception {
    Services services = Services.get();
    SLAService slas = services.get(SLAService.class);
    assertNotNull(slas);
    assertTrue(SLAService.isEnabled());
    services.destroy();
    services = new Services();
    Configuration conf = services.getConf();
    conf.set(Services.CONF_SERVICE_EXT_CLASSES, "");
    services.init();
    assertFalse(SLAService.isEnabled());
}
Also used : Services(org.apache.oozie.service.Services) SLAService(org.apache.oozie.sla.service.SLAService) Configuration(org.apache.hadoop.conf.Configuration) Test(org.junit.Test)

Aggregations

SLAService (org.apache.oozie.sla.service.SLAService)21 Date (java.util.Date)17 Test (org.junit.Test)12 Configuration (org.apache.hadoop.conf.Configuration)10 XConfiguration (org.apache.oozie.util.XConfiguration)9 Path (org.apache.hadoop.fs.Path)7 WorkflowJobBean (org.apache.oozie.WorkflowJobBean)6 CoordinatorActionBean (org.apache.oozie.CoordinatorActionBean)4 SLACalcStatus (org.apache.oozie.sla.SLACalcStatus)4 SLACalculatorMemory (org.apache.oozie.sla.SLACalculatorMemory)4 TestSLAService (org.apache.oozie.sla.TestSLAService)4 CoordSubmitXCommand (org.apache.oozie.command.coord.CoordSubmitXCommand)3 WorkflowJobGetJPAExecutor (org.apache.oozie.executor.jpa.WorkflowJobGetJPAExecutor)3 EventHandlerService (org.apache.oozie.service.EventHandlerService)3 JPAService (org.apache.oozie.service.JPAService)3 File (java.io.File)2 FileWriter (java.io.FileWriter)2 Reader (java.io.Reader)2 Writer (java.io.Writer)2 ArrayList (java.util.ArrayList)2