Examples of BundleJobUpdateJPAExecutor


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

        bundleJob.setSuspendedTime(new Date());
        bundleJob.setLastModifiedTime(new Date());

        LOG.debug("Suspend bundle job id = " + jobId + ", status = " + bundleJob.getStatus() + ", pending = " + bundleJob.isPending());
        try {
            jpaService.execute(new BundleJobUpdateJPAExecutor(bundleJob));
        }
        catch (JPAExecutorException e) {
            throw new CommandException(e);
        }
    }
View Full Code Here

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

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

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

            try {
                // if there is no coordinator for this bundle, failed it.
                if (map.isEmpty()) {
                    bundleJob.setStatus(Job.Status.FAILED);
                    bundleJob.resetPending();
                    jpaService.execute(new BundleJobUpdateJPAExecutor(bundleJob));
                    LOG.debug("No coord jobs for the bundle=[{0}], failed it!!", jobId);
                    throw new CommandException(ErrorCode.E1318, jobId);
                }

                for (Entry<String, Boolean> coordName : map.entrySet()) {
View Full Code Here

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

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

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

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

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

        InstrumentUtils.incrJobCounter("bundle_resume", 1, null);
        bundleJob.setSuspendedTime(null);
        bundleJob.setLastModifiedTime(new Date());
        LOG.debug("Resume bundle job id = " + bundleId + ", status = " + bundleJob.getStatus() + ", pending = " + bundleJob.isPending());
        try {
            jpaService.execute(new BundleJobUpdateJPAExecutor(bundleJob));
        }
        catch (JPAExecutorException e) {
            throw new CommandException(e);
        }
    }
View Full Code Here

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

            }
            else {
                bundleJob.resetPending();
                LOG.info("Bundle job [" + jobId + "] Pending set to FALSE");
            }
            jpaService.execute(new BundleJobUpdateJPAExecutor(bundleJob));
        }
View Full Code Here

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

                                + changeValue);
                        action.setPending(action.getPending() + 1);
                        jpaService.execute(new BundleActionUpdateJPAExecutor(action));
                    }
                }
                jpaService.execute(new BundleJobUpdateJPAExecutor(bundleJob));
            }
            return null;
        }
        catch (XException ex) {
            throw new CommandException(ex);
View Full Code Here

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

        final JPAService jpaService = Services.get().get(JPAService.class);
        assertNotNull(jpaService);

        job.setPauseTime(new Date(new Date().getTime() - 30 * 1000));
        job.setKickoffTime(new Date(new Date().getTime() + 3600 * 1000));
        jpaService.execute(new BundleJobUpdateJPAExecutor(job));

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

        final String jobId = job.getId();
        waitFor(10 * 1000, new Predicate() {
            public boolean evaluate() throws Exception {
                BundleJobBean job1 = jpaService.execute(new BundleJobGetJPAExecutor(jobId));
                return job1.getStatus() == Job.Status.PREPPAUSED;
            }
        });

        job = jpaService.execute(new BundleJobGetJPAExecutor(jobId));
        assertEquals(Job.Status.PREPPAUSED, job.getStatus());

        job.setPauseTime(new Date(new Date().getTime() + 3600 * 1000));
        jpaService.execute(new BundleJobUpdateJPAExecutor(job));

        pauseStartRunnable.run();

        waitFor(10 * 1000, new Predicate() {
            public boolean evaluate() throws Exception {
View Full Code Here

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

        final JPAService jpaService = Services.get().get(JPAService.class);
        assertNotNull(jpaService);

        job.setPauseTime(new Date(new Date().getTime() - 30 * 1000));
        job.setKickoffTime(new Date(new Date().getTime() + 3600 * 1000));
        jpaService.execute(new BundleJobUpdateJPAExecutor(job));

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

        final String jobId = job.getId();
        waitFor(10 * 1000, new Predicate() {
            public boolean evaluate() throws Exception {
                BundleJobBean job1 = jpaService.execute(new BundleJobGetJPAExecutor(jobId));
                return job1.getStatus() == Job.Status.PREPPAUSED;
            }
        });

        job = jpaService.execute(new BundleJobGetJPAExecutor(jobId));
        assertEquals(Job.Status.PREPPAUSED, job.getStatus());

        job.setPauseTime(null);
        jpaService.execute(new BundleJobUpdateJPAExecutor(job));

        pauseStartRunnable.run();

        waitFor(10 * 1000, new Predicate() {
            public boolean evaluate() throws Exception {
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.