Package org.apache.oozie.executor.jpa

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


        CoordinatorJobBean coordJob1 = addRecordToCoordJobTable("action1", CoordinatorJob.Status.RUNNING, false);
        CoordinatorJobBean coordJob2 = addRecordToCoordJobTable("action2", CoordinatorJob.Status.RUNNING, false);

        coordJob1.setAppNamespace(SchemaService.COORDINATOR_NAMESPACE_URI_1);
        coordJob1.setPauseTime(pauseTime);
        jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob1));
        coordJob2.setAppNamespace(SchemaService.COORDINATOR_NAMESPACE_URI_1);
        coordJob2.setPauseTime(pauseTime);
        jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob2));

        Runnable pauseStartRunnable = new PauseTransitRunnable();
        pauseStartRunnable.run();

        final String coordJobId1 = coordJob1.getId();
View Full Code Here


        InstrumentUtils.incrJobCounter(getName(), 1, getInstrumentation());
        coordJob.setSuspendedTime(null);
        coordJob.setLastModifiedTime(new Date());
        LOG.debug("Resume coordinator job id = " + jobId + ", status = " + coordJob.getStatus() + ", pending = " + coordJob.isPending());
        try {
            jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob));
        }
        catch (JPAExecutorException e) {
            throw new CommandException(e);
        }
    }
View Full Code Here

                coordJob.setStatus(CoordinatorJob.Status.FAILED);
                coordJob.resetPending();
                LOG.warn("Resume children failed so fail coordinator, coordinator job id = " + jobId
                        + ", status = " + coordJob.getStatus());
                try {
                    jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob));
                }
                catch (JPAExecutorException je) {
                    LOG.error("Failed to update coordinator job : " + jobId, je);
                }
            }
View Full Code Here

                        continue;
                    }
                    queueCallable(new CoordMaterializeTransitionXCommand(coordJob.getId(), materializationWindow));
                    //update lastModifiedTime so next time others might have higher chance to get pick up
                    coordJob.setLastModifiedTime(new Date());
                    jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob));

                }

            }
            catch (JPAExecutorException jex) {
View Full Code Here

            if (exceptionOccured) {
                coordJob.setStatus(CoordinatorJob.Status.FAILED);
                coordJob.resetPending();
                LOG.debug("Exception happened, fail coordinator job id = " + jobId + ", status = " + coordJob.getStatus());
                try {
                    jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob));
                }
                catch (JPAExecutorException je) {
                    LOG.error("Failed to update coordinator job : " + jobId, je);
                }
            }
View Full Code Here

        InstrumentUtils.incrJobCounter(getName(), 1, getInstrumentation());
        coordJob.setLastModifiedTime(new Date());
        coordJob.setSuspendedTime(new Date());
        LOG.debug("Suspend coordinator job id = " + jobId + ", status = " + coordJob.getStatus() + ", pending = " + coordJob.isPending());
        try {
            jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob));
        }
        catch (JPAExecutorException e) {
            throw new CommandException(e);
        }
    }
View Full Code Here

                                    .getStatus(), action.getPending());
                        }
                    }
                }
            }
            jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob));

            LOG.debug("Killed coord actions for the coordinator=[{0}]", jobId);
        }
        catch (JPAExecutorException ex) {
            throw new CommandException(ex);
View Full Code Here

    }

    @Override
    public void updateJob() throws CommandException {
        try {
            jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob));
        }
        catch (JPAExecutorException ex) {
            throw new CommandException(ex);
        }
    }
View Full Code Here

        CoordinatorJobBean coordJob = addRecordToCoordJobTable(CoordinatorJob.Status.RUNNING, start, end, true, true, 3);

        final JPAService jpaService = Services.get().get(JPAService.class);
        assertNotNull(jpaService);
        coordJob.setAppNamespace(SchemaService.COORDINATOR_NAMESPACE_URI_1);
        jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob));

        addRecordToCoordActionTable(coordJob.getId(), 1, CoordinatorAction.Status.KILLED, "coord-action-get.xml", 0);
        addRecordToCoordActionTable(coordJob.getId(), 2, CoordinatorAction.Status.SUCCEEDED, "coord-action-get.xml", 0);
        addRecordToCoordActionTable(coordJob.getId(), 3, CoordinatorAction.Status.SUCCEEDED, "coord-action-get.xml", 0);
View Full Code Here

     * @see org.apache.oozie.command.TransitionXCommand#updateJob()
     */
    @Override
    public void updateJob() throws CommandException {
        try {
            jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob));
        }
        catch (JPAExecutorException e) {
            throw new CommandException(e);
        }
    }
View Full Code Here

TOP

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

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.