Package org.apache.oozie.executor.jpa

Examples of org.apache.oozie.executor.jpa.CoordJobGetActionsJPAExecutor


    }

    private void checkCoordActions(String jobId, int number, CoordinatorJob.Status status) {
        try {
            JPAService jpaService = Services.get().get(JPAService.class);
            Integer actionsSize = jpaService.execute(new CoordJobGetActionsJPAExecutor(jobId));
            if (actionsSize != number) {
                fail("Should have " + number + " actions created for job " + jobId + ", but has " + actionsSize + " actions.");
            }

            if (status != null) {
View Full Code Here


     * @see org.apache.oozie.command.ResumeTransitionXCommand#resumeChildren()
     */
    @Override
    public void resumeChildren() throws CommandException {
        try {
            List<CoordinatorActionBean> actionList = jpaService.execute(new CoordJobGetActionsJPAExecutor(jobId));

            for (CoordinatorActionBean action : actionList) {
                if(action.getStatus() == CoordinatorActionBean.Status.SUSPENDED){
                    // queue a ResumeXCommand
                    if (action.getExternalId() != null) {
View Full Code Here

     * @see org.apache.oozie.command.SuspendTransitionXCommand#suspendChildren()
     */
    @Override
    public void suspendChildren() throws CommandException {
        try {
            List<CoordinatorActionBean> actionList = jpaService.execute(new CoordJobGetActionsJPAExecutor(jobId));
            for (CoordinatorActionBean action : actionList) {
                if (action.getStatus() == CoordinatorActionBean.Status.RUNNING) {
                    // queue a SuspendXCommand
                    if (action.getExternalId() != null) {
                        queue(new SuspendXCommand(action.getExternalId()));
View Full Code Here

        try {
            jpaService = Services.get().get(JPAService.class);

            if (jpaService != null) {
                this.coordJob = jpaService.execute(new CoordJobGetJPAExecutor(jobId));
                this.actionList = jpaService.execute(new CoordJobGetActionsJPAExecutor(jobId));
                prevStatus = coordJob.getStatus();
                LogUtils.setLogInfo(coordJob, logInfo);
            }
            else {
                throw new CommandException(ErrorCode.E0610);
View Full Code Here

                        }
                        String jobId = coordJob.getId();
                        Job.Status[] coordStatus = new Job.Status[1];
                        coordStatus[0] = coordJob.getStatus();
                        List<CoordinatorActionBean> coordActions = jpaService
                                .execute(new CoordJobGetActionsJPAExecutor(jobId));
                        HashMap<CoordinatorAction.Status, Integer> coordActionStatus = new HashMap<CoordinatorAction.Status, Integer>();
                        boolean foundPending = false;
                        for (CoordinatorActionBean cAction : coordActions) {
                            if (!cAction.isPending()) {
                                int counter = 0;
View Full Code Here

    }

    private void checkCoordActions(String jobId, int number, CoordinatorJob.Status status) {
        try {
            JPAService jpaService = Services.get().get(JPAService.class);
            List<CoordinatorActionBean> actions = jpaService.execute(new CoordJobGetActionsJPAExecutor(jobId));
            if (actions.size() != number) {
                fail("Should have " + number + " actions created for job " + jobId + ", but jave " + actions.size() + " actions.");
            }

            if (status != null) {
View Full Code Here

        new CoordMaterializeTransitionXCommand(job.getId(), 3600).call();
        JPAService jpaService = Services.get().get(JPAService.class);
        job = jpaService.execute(new CoordJobGetJPAExecutor(job.getId()));
        assertEquals(CoordinatorJob.Status.FAILED, job.getStatus());
        // GetActions for coord job, should be none
        int actions = jpaService.execute(new CoordJobGetActionsJPAExecutor(job.getId()));
        assertEquals(0, actions);

    }
View Full Code Here

    }

    private void checkCoordActions(String jobId, int number, CoordinatorJob.Status status) {
        try {
            JPAService jpaService = Services.get().get(JPAService.class);
            Integer actionsSize = jpaService.execute(new CoordJobGetActionsJPAExecutor(jobId));
            if (actionsSize != number) {
                fail("Should have " + number + " actions created for job " + jobId + ", but has " + actionsSize + " actions.");
            }

            if (status != null) {
View Full Code Here

    }

    private void checkCoordActions(String jobId, int number, CoordinatorJob.Status status) {
        try {
            JPAService jpaService = Services.get().get(JPAService.class);
            Integer actionsSize = jpaService.execute(new CoordJobGetActionsJPAExecutor(jobId));
            if (actionsSize != number) {
                fail("Should have " + number + " actions created for job " + jobId + ", but has " + actionsSize + " actions.");
            }

            if (status != null) {
View Full Code Here

        new CoordMaterializeTransitionXCommand(job.getId(), 3600).call();
        JPAService jpaService = Services.get().get(JPAService.class);
        job = jpaService.execute(new CoordJobGetJPAExecutor(job.getId()));
        assertEquals(CoordinatorJob.Status.FAILED, job.getStatus());
        // GetActions for coord job, should be none
        int actions = jpaService.execute(new CoordJobGetActionsJPAExecutor(job.getId()));
        assertEquals(0, actions);

    }
View Full Code Here

TOP

Related Classes of org.apache.oozie.executor.jpa.CoordJobGetActionsJPAExecutor

Copyright © 2018 www.massapicom. 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.