Search in sources :

Example 71 with Services

use of org.apache.oozie.service.Services in project oozie by apache.

the class TestWorkflowActionKillXCommand method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    services = new Services();
    services.init();
}
Also used : Services(org.apache.oozie.service.Services)

Example 72 with Services

use of org.apache.oozie.service.Services in project oozie by apache.

the class TestWorkflowKillXCommand method testChildId.

public void testChildId() throws Exception {
    services.destroy();
    setSystemProperty(UUIDService.CONF_GENERATOR, "counter");
    services = new Services();
    services.init();
    UUIDService uuid = services.get(UUIDService.class);
    String id = uuid.generateId(ApplicationType.WORKFLOW);
    String childId = uuid.generateChildId(id, "a");
    assertEquals(id, uuid.getId(childId));
    assertEquals("a", uuid.getChildName(childId));
    services.destroy();
    setSystemProperty(UUIDService.CONF_GENERATOR, "random");
    services = new Services();
    services.init();
    uuid = services.get(UUIDService.class);
    id = uuid.generateId(ApplicationType.WORKFLOW);
    childId = uuid.generateChildId(id, "a");
    assertEquals(id, uuid.getId(childId));
    assertEquals("a", uuid.getChildName(childId));
}
Also used : Services(org.apache.oozie.service.Services) UUIDService(org.apache.oozie.service.UUIDService)

Example 73 with Services

use of org.apache.oozie.service.Services in project oozie by apache.

the class TestWorkflowKillXCommand method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    services = new Services();
    services.init();
}
Also used : Services(org.apache.oozie.service.Services)

Example 74 with Services

use of org.apache.oozie.service.Services in project oozie by apache.

the class TestWorkflowNotificationXCommand method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    setSystemProperty(NotificationXCommand.NOTIFICATION_URL_CONNECTION_TIMEOUT_KEY, "50");
    Services services = new Services();
    services.init();
    container = new EmbeddedServletContainer("blah");
    container.addServletEndpoint("/hang/*", HangServlet.class);
    callbackServlet = new CallbackServlet();
    container.addServletEndpoint("/callback/*", callbackServlet);
    container.start();
}
Also used : Services(org.apache.oozie.service.Services) EmbeddedServletContainer(org.apache.oozie.test.EmbeddedServletContainer)

Example 75 with Services

use of org.apache.oozie.service.Services in project oozie by apache.

the class TestCodecFactory method setUp.

@Override
@Before
protected void setUp() throws Exception {
    super.setUp();
    services = new Services();
    services.getConf().set(CodecFactory.COMPRESSION_OUTPUT_CODEC, GzipCompressionCodec.CODEC_NAME);
    services.init();
}
Also used : Services(org.apache.oozie.service.Services) Before(org.junit.Before)

Aggregations

Services (org.apache.oozie.service.Services)247 JPAService (org.apache.oozie.service.JPAService)32 Configuration (org.apache.hadoop.conf.Configuration)21 Date (java.util.Date)17 CoordinatorJobBean (org.apache.oozie.CoordinatorJobBean)16 File (java.io.File)14 Before (org.junit.Before)14 XConfiguration (org.apache.oozie.util.XConfiguration)11 Path (org.apache.hadoop.fs.Path)10 ActionExecutorException (org.apache.oozie.action.ActionExecutorException)10 CoordinatorActionBean (org.apache.oozie.CoordinatorActionBean)8 EmbeddedServletContainer (org.apache.oozie.test.EmbeddedServletContainer)8 FileOutputStream (java.io.FileOutputStream)7 InputStream (java.io.InputStream)7 HashMap (java.util.HashMap)7 IOException (java.io.IOException)6 Properties (java.util.Properties)6 ActionService (org.apache.oozie.service.ActionService)6 StringWriter (java.io.StringWriter)5 WorkflowActionBean (org.apache.oozie.WorkflowActionBean)5