use of org.apache.oozie.service.Services in project oozie by apache.
the class TestCoordELExtensions method setUp.
@Override
protected void setUp() throws Exception {
setSystemProperty("oozie.test.config.file", new File(OOZIE_SRC_DIR, "core/src/test/resources/oozie-site-coordel.xml").getAbsolutePath());
super.setUp();
services = new Services();
setClassesToBeExcluded(services.getConf(), excludedServices);
services.init();
}
use of org.apache.oozie.service.Services in project oozie by apache.
the class TestCoordJobsXCommand method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
services = new Services();
services.init();
LocalOozie.start();
}
use of org.apache.oozie.service.Services in project oozie by apache.
the class TestCoordKillXCommand method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
services = new Services();
setClassesToBeExcluded(services.getConf(), excludedServices);
services.init();
}
use of org.apache.oozie.service.Services in project oozie by apache.
the class TestCoordMaterializeTransitionXCommand method testActionMaterForHcatalogIncorrectURI.
public void testActionMaterForHcatalogIncorrectURI() throws Exception {
Services.get().destroy();
Services services = super.setupServicesForHCatalog();
services.init();
Date startTime = DateUtils.parseDateOozieTZ("2009-03-06T010:00Z");
Date endTime = DateUtils.parseDateOozieTZ("2009-03-11T10:00Z");
CoordinatorJobBean job = addRecordToCoordJobTableForWaiting("coord-job-for-matd-neg-hcat.xml", CoordinatorJob.Status.RUNNING, startTime, endTime, false, false, 0);
try {
new CoordMaterializeTransitionXCommand(job.getId(), hoursToSeconds(1)).call();
fail("Expected Command exception but didn't catch any");
} catch (CommandException e) {
e.printStackTrace();
job = services.get(JPAService.class).execute(new CoordJobGetJPAExecutor(job.getId()));
assertEquals(CoordinatorJob.Status.FAILED, job.getStatus());
assertEquals(ErrorCode.E1012, e.getErrorCode());
} catch (Exception e) {
fail("Unexpected exception " + e.getMessage());
}
}
use of org.apache.oozie.service.Services in project oozie by apache.
the class TestCoordMaterializeTransitionXCommand method testActionMaterForHcatalog.
public void testActionMaterForHcatalog() throws Exception {
Services.get().destroy();
Services services = super.setupServicesForHCatalog();
services.init();
Date startTime = DateUtils.parseDateOozieTZ("2009-03-06T010:00Z");
Date endTime = DateUtils.parseDateOozieTZ("2009-03-11T10:00Z");
CoordinatorJobBean job = addRecordToCoordJobTableForWaiting("coord-job-for-matd-hcat.xml", CoordinatorJob.Status.RUNNING, startTime, endTime, false, false, 0);
new CoordMaterializeTransitionXCommand(job.getId(), hoursToSeconds(1)).call();
CoordinatorActionBean actionBean = getCoordAction(job.getId() + "@1");
assertEquals("file://dummyhdfs/2009/05/_SUCCESS" + CoordCommandUtils.RESOLVED_UNRESOLVED_SEPARATOR + "${coord:latestRange(-1,0)}", actionBean.getMissingDependencies());
assertEquals("hcat://dummyhcat:1000/db1/table1/ds=2009-12" + CoordELFunctions.INSTANCE_SEPARATOR + "hcat://dummyhcat:1000/db3/table3/ds=2009-05" + CoordELFunctions.INSTANCE_SEPARATOR + "hcat://dummyhcat:1000/db3/table3/ds=2009-26", actionBean.getPushMissingDependencies());
}
Aggregations