Search in sources :

Example 1 with SLAEventsGetForFilterJPAExecutor

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

the class SLAEventsXCommand method execute.

@Override
protected List<SLAEventBean> execute() throws CommandException {
    try {
        JPAService jpaService = Services.get().get(JPAService.class);
        List<SLAEventBean> slaEventList = null;
        long[] lastSeqId = new long[1];
        if (jpaService != null) {
            slaEventList = jpaService.execute(new SLAEventsGetForFilterJPAExecutor(seqId, maxNoEvents, filter, lastSeqId));
        } else {
            LOG.error(ErrorCode.E0610);
        }
        setLastSeqId(lastSeqId[0]);
        return slaEventList;
    } catch (XException ex) {
        throw new CommandException(ex);
    }
}
Also used : XException(org.apache.oozie.XException) SLAEventsGetForFilterJPAExecutor(org.apache.oozie.executor.jpa.SLAEventsGetForFilterJPAExecutor) CommandException(org.apache.oozie.command.CommandException) JPAService(org.apache.oozie.service.JPAService) SLAEventBean(org.apache.oozie.SLAEventBean)

Aggregations

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