Examples of AbandonedCoordCheckerRunnable


Examples of org.apache.oozie.service.AbandonedCoordCheckerService.AbandonedCoordCheckerRunnable

        final CoordinatorJobBean job2 = addRecordToCoordJobTable(CoordinatorJob.Status.RUNNING, start, end,
                createdTime, true, false, 4);
        addRecordToCoordActionTable(job2.getId(), 4, CoordinatorAction.Status.FAILED);

        AbandonedCoordCheckerRunnable coordChecked = new AbandonedCoordCheckerRunnable(5);
        coordChecked.run();
        String msg = coordChecked.getMessage();
        assertTrue(msg.contains(job1.getId()));
        assertFalse(msg.contains(job2.getId()));

    }
View Full Code Here

Examples of org.apache.oozie.service.AbandonedCoordCheckerService.AbandonedCoordCheckerRunnable

                createdTime, true, false, 6);

        addRecordToCoordActionTable(job2.getId(), 6, CoordinatorAction.Status.SUCCEEDED,
                CoordinatorAction.Status.FAILED);

        AbandonedCoordCheckerRunnable coordChecked = new AbandonedCoordCheckerRunnable(5);
        coordChecked.run();
        String msg = coordChecked.getMessage();
        assertFalse(msg.contains(job1.getId()));
        assertFalse(msg.contains(job2.getId()));
    }
View Full Code Here

Examples of org.apache.oozie.service.AbandonedCoordCheckerService.AbandonedCoordCheckerRunnable

        final CoordinatorJobBean job2 = addRecordToCoordJobTable(CoordinatorJob.Status.RUNNING, start, end,
                createdTime, true, false, 4);
        addRecordToCoordActionTable(job2.getId(), 4, CoordinatorAction.Status.TIMEDOUT);

        AbandonedCoordCheckerRunnable coordChecked = new AbandonedCoordCheckerRunnable(10);
        coordChecked.run();
        String msg = coordChecked.getMessage();
        assertTrue(msg.contains(job1.getId()));
        assertFalse(msg.contains(job2.getId()));

    }
View Full Code Here

Examples of org.apache.oozie.service.AbandonedCoordCheckerService.AbandonedCoordCheckerRunnable

        final CoordinatorJobBean job3 = addRecordToCoordJobTable(CoordinatorJob.Status.SUCCEEDED, start, end,
                createdTime, true, false, 5);
        addRecordToCoordActionTable(job3.getId(), 5, CoordinatorAction.Status.FAILED,
                CoordinatorAction.Status.SUSPENDED, CoordinatorAction.Status.TIMEDOUT);

        AbandonedCoordCheckerRunnable coordChecked = new AbandonedCoordCheckerRunnable(5);
        coordChecked.run();
        String msg = coordChecked.getMessage();
        assertTrue(msg.contains(job1.getId()));
        assertTrue(msg.contains(job2.getId()));
        assertFalse(msg.contains(job3.getId()));
    }
View Full Code Here

Examples of org.apache.oozie.service.AbandonedCoordCheckerService.AbandonedCoordCheckerRunnable

                true, false, 6);
        addRecordToCoordActionTable(job1.getId(), 6, CoordinatorAction.Status.FAILED);
        CoordinatorJobBean job2 = addRecordToCoordJobTable(CoordinatorJob.Status.RUNNING, start, end, createdTime,
                true, false, 4);
        addRecordToCoordActionTable(job2.getId(), 4, CoordinatorAction.Status.FAILED);
        new AbandonedCoordCheckerRunnable(5, true).run();
        assertEquals(CoordJobQueryExecutor.getInstance().get(CoordJobQuery.GET_COORD_JOB, job1.getId()).getStatus(),
                CoordinatorJob.Status.KILLED);
        assertEquals(CoordJobQueryExecutor.getInstance().get(CoordJobQuery.GET_COORD_JOB, job2.getId()).getStatus(),
                CoordinatorJob.Status.RUNNING);
    }
View Full Code Here

Examples of org.apache.oozie.service.AbandonedCoordCheckerService.AbandonedCoordCheckerRunnable

        start = DateUtils.addDays(new Date(), -3);
        createdTime = DateUtils.addDays(new Date(), -4);
        CoordinatorJobBean job2 = addRecordToCoordJobTable(CoordinatorJob.Status.RUNNING, start, end, createdTime,
                true, false, 4);
        addRecordToCoordActionTable(job2.getId(), 10, CoordinatorAction.Status.FAILED);
        new AbandonedCoordCheckerRunnable(5, true).run();

        // job1 should be RUNNING as starttime > 2 days buffer
        assertEquals(CoordJobQueryExecutor.getInstance().get(CoordJobQuery.GET_COORD_JOB, job1.getId()).getStatus(),
                CoordinatorJob.Status.RUNNING);
        assertEquals(CoordJobQueryExecutor.getInstance().get(CoordJobQuery.GET_COORD_JOB, job2.getId()).getStatus(),
View Full Code Here

Examples of org.apache.oozie.service.AbandonedCoordCheckerService.AbandonedCoordCheckerRunnable

        createdTime = DateUtils.addDays(new Date(), -3);

        CoordinatorJobBean job2 = addRecordToCoordJobTable(CoordinatorJob.Status.RUNNING, start, end, createdTime,
                true, false, 4);
        addRecordToCoordActionTable(job2.getId(), 10, CoordinatorAction.Status.FAILED);
        new AbandonedCoordCheckerRunnable(5, true).run();

        // Only one job should be running.
        assertEquals(CoordJobQueryExecutor.getInstance().get(CoordJobQuery.GET_COORD_JOB, job1.getId()).getStatus(),
                CoordinatorJob.Status.RUNNING);
        assertEquals(CoordJobQueryExecutor.getInstance().get(CoordJobQuery.GET_COORD_JOB, job2.getId()).getStatus(),
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.