Examples of SLARegistrationGetJPAExecutor


Examples of org.apache.oozie.executor.jpa.sla.SLARegistrationGetJPAExecutor

     */
    public static void updateRegistrationEvent(String jobId) throws CommandException, JPAExecutorException {
        JPAService jpaService = Services.get().get(JPAService.class);
        SLAService slaService = Services.get().get(SLAService.class);
        try {
            SLARegistrationBean reg = jpaService.execute(new SLARegistrationGetJPAExecutor(jobId));
            if (reg != null) { //handle coord rerun with different config without sla
                slaService.updateRegistrationEvent(reg);
            }
        }
        catch (ServiceException e) {
View Full Code Here

Examples of org.apache.oozie.executor.jpa.sla.SLARegistrationGetJPAExecutor

            CoordinatorActionBean bean = jpaService.execute(new CoordActionGetJPAExecutor(actionId));
            // delete SLA registration entry (if any) for action
            if (SLAService.isEnabled()) {
                Services.get().get(SLAService.class).removeRegistration(actionId);
            }
            SLARegistrationBean slaReg = jpaService.execute(new SLARegistrationGetJPAExecutor(actionId));
            if (slaReg != null) {
                LOG.debug("Deleting registration bean corresponding to action " + slaReg.getId());
                deleteList.add(slaReg);
            }
            SLASummaryBean slaSummaryBean = jpaService.execute(new SLASummaryGetJPAExecutor(actionId));
View Full Code Here

Examples of org.apache.oozie.executor.jpa.sla.SLARegistrationGetJPAExecutor

        catch (JPAExecutorException jpae) {
            assertEquals(ErrorCode.E0603, jpae.getErrorCode());
            jpae.printStackTrace();
        }

        slaRegBean1 = jpaService.execute(new SLARegistrationGetJPAExecutor(slaRegBean1.getId()));
        assertNotNull(slaRegBean1);
        slaRegBean2 = jpaService.execute(new SLARegistrationGetJPAExecutor(slaRegBean2.getId()));
        assertNotNull(slaRegBean2);
        slaRegBean3 = jpaService.execute(new SLARegistrationGetJPAExecutor(slaRegBean3.getId()));
        assertNull(slaRegBean3);
        slaRegBean4 = jpaService.execute(new SLARegistrationGetJPAExecutor(slaRegBean4.getId()));
        assertNull(slaRegBean4);
        slaSummaryBean3 = jpaService.execute(new SLASummaryGetJPAExecutor(slaSummaryBean3.getId()));
        assertNull(slaSummaryBean3);
        slaSummaryBean1 = jpaService.execute(new SLASummaryGetJPAExecutor(slaSummaryBean1.getId()));
        assertNotNull(slaSummaryBean1);
View Full Code Here

Examples of org.apache.oozie.executor.jpa.sla.SLARegistrationGetJPAExecutor

        _addRecordToSLARegistrationTable(jobId, AppType.WORKFLOW_JOB, current, new Date(), "END_MISS",
                "alert@example.com");
        JPAService jpaService = Services.get().get(JPAService.class);
        assertNotNull(jpaService);

        SLARegistrationGetJPAExecutor readCmd = new SLARegistrationGetJPAExecutor(jobId);
        SLARegistrationBean bean = jpaService.execute(readCmd);
        assertEquals(jobId, bean.getId());
        assertEquals(AppType.WORKFLOW_JOB, bean.getAppType());
        assertEquals(current, bean.getExpectedStart());
        assertEquals(2, bean.getSlaConfigMap().size());
View Full Code Here

Examples of org.apache.oozie.executor.jpa.sla.SLARegistrationGetJPAExecutor

                + " <sla:alert-contact>abc@example.com</sla:alert-contact>" + "</sla:info>";
        Element eSla = XmlUtils.parseXml(slaXml);
        SLAOperations.createSlaRegistrationEvent(eSla, "job-id1", "parent-id1", AppType.WORKFLOW_JOB, getTestUser(),
                "test-appname", log, false);
        SLARegistrationBean reg = Services.get().get(JPAService.class)
                .execute(new SLARegistrationGetJPAExecutor("job-id1"));
        assertEquals("END_MISS", reg.getAlertEvents());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.