Search in sources :

Example 76 with BundleActionBean

use of org.apache.oozie.BundleActionBean in project oozie by apache.

the class XDataTestCase method createBundleAction.

/**
 * Create bundle action bean
 *
 * @param jobId bundle job id
 * @param coordId coordinator id
 * @param coordName coordinator name
 * @param pending true if action is pending
 * @param status job status
 * @return bundle action bean
 * @throws Exception
 */
protected BundleActionBean createBundleAction(String jobId, String coordId, String coordName, int pending, Job.Status status) throws Exception {
    BundleActionBean action = new BundleActionBean();
    action.setBundleId(jobId);
    action.setBundleActionId(jobId + "_" + coordName);
    action.setPending(pending);
    action.setCoordId(coordId);
    action.setCoordName(coordName);
    action.setStatus(status);
    action.setLastModifiedTime(new Date());
    return action;
}
Also used : BundleActionBean(org.apache.oozie.BundleActionBean) Date(java.util.Date)

Aggregations

BundleActionBean (org.apache.oozie.BundleActionBean)76 BundleJobBean (org.apache.oozie.BundleJobBean)58 CoordinatorJobBean (org.apache.oozie.CoordinatorJobBean)36 JPAService (org.apache.oozie.service.JPAService)35 BundleJobGetJPAExecutor (org.apache.oozie.executor.jpa.BundleJobGetJPAExecutor)33 JPAExecutorException (org.apache.oozie.executor.jpa.JPAExecutorException)30 BundleActionGetJPAExecutor (org.apache.oozie.executor.jpa.BundleActionGetJPAExecutor)24 CoordinatorActionBean (org.apache.oozie.CoordinatorActionBean)20 CoordJobGetJPAExecutor (org.apache.oozie.executor.jpa.CoordJobGetJPAExecutor)20 Date (java.util.Date)19 WorkflowJobBean (org.apache.oozie.WorkflowJobBean)19 WorkflowActionBean (org.apache.oozie.WorkflowActionBean)16 WorkflowJobGetJPAExecutor (org.apache.oozie.executor.jpa.WorkflowJobGetJPAExecutor)13 IOException (java.io.IOException)10 CommandException (org.apache.oozie.command.CommandException)10 StatusTransitRunnable (org.apache.oozie.service.StatusTransitService.StatusTransitRunnable)10 CoordActionGetJPAExecutor (org.apache.oozie.executor.jpa.CoordActionGetJPAExecutor)9 WorkflowActionGetJPAExecutor (org.apache.oozie.executor.jpa.WorkflowActionGetJPAExecutor)9 XConfiguration (org.apache.oozie.util.XConfiguration)8 ArrayList (java.util.ArrayList)6