use of org.apache.oozie.executor.jpa.JPAExecutorException in project oozie by apache.
the class CoordResumeXCommand method loadState.
@Override
protected void loadState() throws CommandException {
jpaService = Services.get().get(JPAService.class);
if (jpaService == null) {
throw new CommandException(ErrorCode.E0610);
}
try {
coordJob = jpaService.execute(new CoordJobGetJPAExecutor(jobId));
} catch (JPAExecutorException e) {
throw new CommandException(e);
}
setJob(coordJob);
prevStatus = coordJob.getStatus();
LogUtils.setLogInfo(coordJob);
}
use of org.apache.oozie.executor.jpa.JPAExecutorException in project oozie by apache.
the class CoordActionInputCheckXCommand method loadState.
@Override
protected void loadState() throws CommandException {
if (jpaService == null) {
jpaService = Services.get().get(JPAService.class);
}
try {
coordAction = jpaService.execute(new CoordActionGetForInputCheckJPAExecutor(actionId));
coordJob = CoordJobQueryExecutor.getInstance().get(CoordJobQuery.GET_COORD_JOB_INPUT_CHECK, coordAction.getJobId());
} catch (JPAExecutorException je) {
throw new CommandException(je);
}
LogUtils.setLogInfo(coordAction);
}
use of org.apache.oozie.executor.jpa.JPAExecutorException in project oozie by apache.
the class CoordActionSkipXCommand method loadState.
@Override
protected void loadState() throws CommandException {
jpaService = Services.get().get(JPAService.class);
if (jpaService == null) {
throw new CommandException(ErrorCode.E0610);
}
try {
actionBean = jpaService.execute(new CoordActionGetForTimeoutJPAExecutor(actionBean.getId()));
} catch (JPAExecutorException e) {
throw new CommandException(e);
}
LogUtils.setLogInfo(actionBean);
}
use of org.apache.oozie.executor.jpa.JPAExecutorException in project oozie by apache.
the class CoordActionTimeOutXCommand method execute.
/* (non-Javadoc)
* @see org.apache.oozie.command.XCommand#execute()
*/
@Override
protected Void execute() throws CommandException {
if (actionBean.getStatus() == CoordinatorAction.Status.WAITING) {
actionBean.setStatus(CoordinatorAction.Status.TIMEDOUT);
try {
queue(new CoordActionNotificationXCommand(actionBean), 100);
actionBean.setLastModifiedTime(new Date());
CoordActionQueryExecutor.getInstance().executeUpdate(CoordActionQuery.UPDATE_COORD_ACTION_STATUS_PENDING_TIME, actionBean);
if (EventHandlerService.isEnabled()) {
generateEvent(actionBean, user, appName, null);
}
} catch (JPAExecutorException e) {
throw new CommandException(e);
}
}
return null;
}
use of org.apache.oozie.executor.jpa.JPAExecutorException in project oozie by apache.
the class CoordMaterializeTransitionXCommand method loadState.
/* (non-Javadoc)
* @see org.apache.oozie.command.XCommand#loadState()
*/
@Override
protected void loadState() throws CommandException {
jpaService = Services.get().get(JPAService.class);
if (jpaService == null) {
LOG.error(ErrorCode.E0610);
}
try {
coordJob = CoordJobQueryExecutor.getInstance().get(CoordJobQuery.GET_COORD_JOB_MATERIALIZE, jobId);
prevStatus = coordJob.getStatus();
} catch (JPAExecutorException jex) {
throw new CommandException(jex);
}
// calculate start materialize and end materialize time
calcMatdTime();
LogUtils.setLogInfo(coordJob);
}
Aggregations