Examples of BundleJobUpdateJPAExecutor


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

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

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

        Date pauseTime = new Date(new Date().getTime() - 30 * 1000);
        job.setPauseTime(pauseTime);
        jpaService.execute(new BundleJobUpdateJPAExecutor(job));

        BundleActionBean bundleAction1 = this.addRecordToBundleActionTable(job.getId(), "action1", 0, Job.Status.RUNNING);
        BundleActionBean bundleAction2 = this.addRecordToBundleActionTable(job.getId(), "action2", 0, Job.Status.RUNNING);

        String currentDatePlusMonth = XDataTestCase.getCurrentDateafterIncrementingInMonths(1);
View Full Code Here

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

        BundleJobBean job = this.addRecordToBundleJobTable(Job.Status.PAUSED, false);
        final JPAService jpaService = Services.get().get(JPAService.class);
        assertNotNull(jpaService);

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

        BundleActionBean bundleAction1 = this.addRecordToBundleActionTable(job.getId(), "action1", 0, Job.Status.PAUSED);
        BundleActionBean bundleAction2 = this.addRecordToBundleActionTable(job.getId(), "action2", 0, Job.Status.PAUSED);

        String currentDatePlusMonth = XDataTestCase.getCurrentDateafterIncrementingInMonths(1);
View Full Code Here

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

        BundleJobBean job = this.addRecordToBundleJobTable(Job.Status.PREP, false);
        final JPAService jpaService = Services.get().get(JPAService.class);
        assertNotNull(jpaService);

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

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

        final String jobId = job.getId();
View Full Code Here

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

        BundleJobBean job = this.addRecordToBundleJobTable(Job.Status.PREP, false);
        final JPAService jpaService = Services.get().get(JPAService.class);
        assertNotNull(jpaService);

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

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

        final String jobId = job.getId();
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

            // if there is no coordinator for this bundle, failed it.
            if (map.isEmpty()) {
                bundleJob.setStatus(Job.Status.FAILED);
                bundleJob.resetPending();
                try {
                    jpaService.execute(new BundleJobUpdateJPAExecutor(bundleJob));
                }
                catch (JPAExecutorException jex) {
                    throw new CommandException(jex);
                }
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

            }
            else {
                bundleJob.resetPending();
                LOG.info("Bundle job [" + jobId + "] Pending set to FALSE");
            }
            jpaService.execute(new BundleJobUpdateJPAExecutor(bundleJob));
        }
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.