Search in sources :

Example 1 with CoordJobGetActionsNotCompletedJPAExecutor

use of org.apache.oozie.executor.jpa.CoordJobGetActionsNotCompletedJPAExecutor in project oozie by apache.

the class CoordKillXCommand method loadState.

@Override
protected void loadState() throws CommandException {
    try {
        jpaService = Services.get().get(JPAService.class);
        if (jpaService != null) {
            this.coordJob = CoordJobQueryExecutor.getInstance().get(CoordJobQuery.GET_COORD_JOB_SUSPEND_KILL, jobId);
            // Get actions which are not succeeded, failed, timed out or killed
            this.actionList = jpaService.execute(new CoordJobGetActionsNotCompletedJPAExecutor(jobId));
            prevStatus = coordJob.getStatus();
            LogUtils.setLogInfo(coordJob);
        } else {
            throw new CommandException(ErrorCode.E0610);
        }
    } catch (XException ex) {
        throw new CommandException(ex);
    }
}
Also used : CoordJobGetActionsNotCompletedJPAExecutor(org.apache.oozie.executor.jpa.CoordJobGetActionsNotCompletedJPAExecutor) XException(org.apache.oozie.XException) CommandException(org.apache.oozie.command.CommandException) JPAService(org.apache.oozie.service.JPAService)

Aggregations

XException (org.apache.oozie.XException)1 CommandException (org.apache.oozie.command.CommandException)1 CoordJobGetActionsNotCompletedJPAExecutor (org.apache.oozie.executor.jpa.CoordJobGetActionsNotCompletedJPAExecutor)1 JPAService (org.apache.oozie.service.JPAService)1