Search in sources :

Example 1 with CoordinatorJobGetForUserAppnameJPAExecutor

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

the class CoordActionCheckXCommand method loadState.

/* (non-Javadoc)
     * @see org.apache.oozie.command.XCommand#loadState()
     */
@Override
protected void loadState() throws CommandException {
    try {
        jpaService = Services.get().get(JPAService.class);
        if (jpaService != null) {
            coordAction = jpaService.execute(new CoordActionGetForCheckJPAExecutor(actionId));
            coordJob = jpaService.execute(new CoordinatorJobGetForUserAppnameJPAExecutor(coordAction.getJobId()));
            workflowJob = WorkflowJobQueryExecutor.getInstance().get(WorkflowJobQuery.GET_WORKFLOW_FOR_SLA, coordAction.getExternalId());
            LogUtils.setLogInfo(coordAction);
        } else {
            throw new CommandException(ErrorCode.E0610);
        }
    } catch (XException ex) {
        throw new CommandException(ex);
    }
}
Also used : XException(org.apache.oozie.XException) CommandException(org.apache.oozie.command.CommandException) JPAService(org.apache.oozie.service.JPAService) CoordActionGetForCheckJPAExecutor(org.apache.oozie.executor.jpa.CoordActionGetForCheckJPAExecutor) CoordinatorJobGetForUserAppnameJPAExecutor(org.apache.oozie.executor.jpa.CoordinatorJobGetForUserAppnameJPAExecutor)

Aggregations

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