Package org.apache.oozie.command.wf

Examples of org.apache.oozie.command.wf.ActionStartXCommand


                action.getId());
        action.setExternalId(wf.getId());
        jpaService.execute(new CoordActionUpdateJPAExecutor(action));

        String waId = _createWorkflowAction(wf.getId(), "wf-action");
        new ActionStartXCommand(waId, action.getType()).call();

        final WorkflowJobGetJPAExecutor readCmd2 = new WorkflowJobGetJPAExecutor(jobId1);
        waitFor(1 * 100, new Predicate() {
            @Override
            public boolean evaluate() throws Exception {
View Full Code Here


                try {
                    Services.get().get(InstrumentationService.class).get()
                            .incr(INSTRUMENTATION_GROUP, INSTR_RECOVERED_ACTIONS_COUNTER, 1);
                    if (action.getStatus() == WorkflowActionBean.Status.PREP
                            || action.getStatus() == WorkflowActionBean.Status.START_MANUAL) {
                        queueCallable(new ActionStartXCommand(action.getId(), action.getType()));
                    }
                    else if (action.getStatus() == WorkflowActionBean.Status.START_RETRY) {
                        Date nextRunTime = action.getPendingAge();
                        queueCallable(new ActionStartXCommand(action.getId(), action.getType()), nextRunTime.getTime()
                                - System.currentTimeMillis());
                    }
                    else if (action.getStatus() == WorkflowActionBean.Status.DONE
                            || action.getStatus() == WorkflowActionBean.Status.END_MANUAL) {
                        queueCallable(new ActionEndXCommand(action.getId(), action.getType()));
                    }
                    else if (action.getStatus() == WorkflowActionBean.Status.END_RETRY) {
                        Date nextRunTime = action.getPendingAge();
                        queueCallable(new ActionEndXCommand(action.getId(), action.getType()), nextRunTime.getTime()
                                - System.currentTimeMillis());

                    }
                    else if (action.getStatus() == WorkflowActionBean.Status.OK
                            || action.getStatus() == WorkflowActionBean.Status.ERROR) {
                        queueCallable(new SignalXCommand(action.getJobId(), action.getId()));
                    }
                    else if (action.getStatus() == WorkflowActionBean.Status.USER_RETRY) {
                        queueCallable(new ActionStartXCommand(action.getId(), action.getType()));
                    }
                }
                catch (Exception ex) {
                    log.error("Exception, {0}", ex.getMessage(), ex);
                }
View Full Code Here

                            INSTR_RECOVERED_ACTIONS_COUNTER, 1);
                    if (action.getStatus() == WorkflowActionBean.Status.PREP
                            || action.getStatus() == WorkflowActionBean.Status.START_MANUAL) {

                        if (useXCommand) {
                            queueCallable(new ActionStartXCommand(action.getId(), action.getType()));
                        } else {
                            queueCallable(new ActionStartCommand(action.getId(), action.getType()));
                        }

                    }
                    else if (action.getStatus() == WorkflowActionBean.Status.START_RETRY) {
                        Date nextRunTime = action.getPendingAge();
                        if (useXCommand) {
                            queueCallable(new ActionStartXCommand(action.getId(), action.getType()), nextRunTime.getTime()
                                    - System.currentTimeMillis());
                        } else {
                            queueCallable(new ActionStartCommand(action.getId(), action.getType()), nextRunTime.getTime()
                                    - System.currentTimeMillis());
                        }

                    }
                    else if (action.getStatus() == WorkflowActionBean.Status.DONE
                            || action.getStatus() == WorkflowActionBean.Status.END_MANUAL) {
                        if (useXCommand) {
                            queueCallable(new ActionEndXCommand(action.getId(), action.getType()));
                        } else {
                            queueCallable(new ActionEndCommand(action.getId(), action.getType()));
                        }

                    }
                    else if (action.getStatus() == WorkflowActionBean.Status.END_RETRY) {
                        Date nextRunTime = action.getPendingAge();
                        if (useXCommand) {
                            queueCallable(new ActionEndXCommand(action.getId(), action.getType()), nextRunTime.getTime()
                                    - System.currentTimeMillis());
                        } else {
                            queueCallable(new ActionEndCommand(action.getId(), action.getType()), nextRunTime.getTime()
                                    - System.currentTimeMillis());
                        }

                    }
                    else if (action.getStatus() == WorkflowActionBean.Status.OK
                            || action.getStatus() == WorkflowActionBean.Status.ERROR) {
                        if (useXCommand) {
                            queueCallable(new SignalXCommand(action.getJobId(), action.getId()));
                        } else {
                            queueCallable(new SignalCommand(action.getJobId(), action.getId()));
                        }

                    }
                    else if (action.getStatus() == WorkflowActionBean.Status.USER_RETRY) {
                      queueCallable(new ActionStartXCommand(action.getId(), action.getType()));
                    }
                }
            }
            catch (Exception ex) {
                log.error("Exception, {0}", ex.getMessage(), ex);
View Full Code Here

TOP

Related Classes of org.apache.oozie.command.wf.ActionStartXCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.