Examples of BulkUpdateInsertForCoordActionStatusJPAExecutor


Examples of org.apache.oozie.executor.jpa.BulkUpdateInsertForCoordActionStatusJPAExecutor

                    }
                    else {
                        LOG.warn("Unexpected workflow " + wf.getId() + " STATUS " + wf.getStatus());
                        coordAction.setLastModifiedTime(new Date());
                        updateList.add(coordAction);
                        jpaService.execute(new BulkUpdateInsertForCoordActionStatusJPAExecutor(updateList, null));
                        return null;
                    }
                }
            }

            LOG.debug("Updating Coordintaor actionId :" + coordAction.getId() + "status to ="
                            + coordAction.getStatus());
            coordAction.setLastModifiedTime(new Date());
            updateList.add(coordAction);

            if (slaStatus != null) {
                SLAEventBean slaEvent = SLADbOperations.createStatusEvent(coordAction.getSlaXml(), coordAction.getId(), slaStatus,
                        SlaAppType.COORDINATOR_ACTION, LOG);
                if(slaEvent != null) {
                    insertList.add(slaEvent);
                }
            }

            jpaService.execute(new BulkUpdateInsertForCoordActionStatusJPAExecutor(updateList, insertList));
        }
        catch (XException ex) {
            LOG.warn("CoordActionCheckCommand Failed ", ex);
            throw new CommandException(ex);
        }
View Full Code Here

Examples of org.apache.oozie.executor.jpa.BulkUpdateInsertForCoordActionStatusJPAExecutor

     * @see org.apache.oozie.command.SuspendTransitionXCommand#performWrites()
     */
    @Override
    public void performWrites() throws CommandException {
        try {
            jpaService.execute(new BulkUpdateInsertForCoordActionStatusJPAExecutor(updateList, null));
        }
        catch (JPAExecutorException jex) {
            throw new CommandException(jex);
        }
    }
View Full Code Here

Examples of org.apache.oozie.executor.jpa.BulkUpdateInsertForCoordActionStatusJPAExecutor

     * @see org.apache.oozie.command.SuspendTransitionXCommand#performWrites()
     */
    @Override
    public void performWrites() throws CommandException {
        try {
            jpaService.execute(new BulkUpdateInsertForCoordActionStatusJPAExecutor(updateList, null));
        }
        catch (JPAExecutorException jex) {
            throw new CommandException(jex);
        }
    }
View Full Code Here

Examples of org.apache.oozie.executor.jpa.BulkUpdateInsertForCoordActionStatusJPAExecutor

     * @see org.apache.oozie.command.KillTransitionXCommand#performWrites()
     */
    @Override
    public void performWrites() throws CommandException {
        try {
            jpaService.execute(new BulkUpdateInsertForCoordActionStatusJPAExecutor(updateList, null));
        }
        catch (JPAExecutorException e) {
            throw new CommandException(e);
        }
    }
View Full Code Here

Examples of org.apache.oozie.executor.jpa.BulkUpdateInsertForCoordActionStatusJPAExecutor

    }

    @Override
    public void performWrites() throws CommandException {
        try {
            jpaService.execute(new BulkUpdateInsertForCoordActionStatusJPAExecutor(updateList, null));
        }
        catch (JPAExecutorException jex) {
            throw new CommandException(jex);
        }
    }
View Full Code Here

Examples of org.apache.oozie.executor.jpa.BulkUpdateInsertForCoordActionStatusJPAExecutor

    }

    @Override
    public void performWrites() throws CommandException {
        try {
            jpaService.execute(new BulkUpdateInsertForCoordActionStatusJPAExecutor(updateList, null));
        }
        catch (JPAExecutorException e) {
            throw new CommandException(e);
        }
    }
View Full Code Here

Examples of org.apache.oozie.executor.jpa.BulkUpdateInsertForCoordActionStatusJPAExecutor

    }

    @Override
    public void performWrites() throws CommandException {
        try {
            jpaService.execute(new BulkUpdateInsertForCoordActionStatusJPAExecutor(updateList, null));
        }
        catch (JPAExecutorException e) {
            throw new CommandException(e);
        }
    }
View Full Code Here

Examples of org.apache.oozie.executor.jpa.BulkUpdateInsertForCoordActionStatusJPAExecutor

            else {
                LOG.warn("Unexpected workflow " + workflow.getId() + " STATUS " + workflow.getStatus());
                // update lastModifiedTime
                coordAction.setLastModifiedTime(new Date());
                updateList.add(coordAction);
                jpaService.execute(new BulkUpdateInsertForCoordActionStatusJPAExecutor(updateList, null));
                // TODO - Uncomment this when bottom up rerun can change terminal state
                /* CoordinatorJobBean coordJob = jpaService.execute(new CoordJobGetJPAExecutor(coordAction.getJobId()));
                if (!coordJob.isPending()) {
                    coordJob.setPending();
                    jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob));
                }*/
                return null;
            }

            LOG.info("Updating Coordintaor action id :" + coordAction.getId() + " status "
                    + " to " + coordAction.getStatus() + ", pending = " + coordAction.getPending());

            coordAction.setLastModifiedTime(new Date());
            updateList.add(coordAction);
            // TODO - Uncomment this when bottom up rerun can change terminal state
            /*CoordinatorJobBean coordJob = jpaService.execute(new CoordJobGetJPAExecutor(coordAction.getJobId()));
            if (!coordJob.isPending()) {
                coordJob.setPending();
                jpaService.execute(new CoordJobUpdateJPAExecutor(coordJob));
                LOG.info("Updating Coordinator job "+ coordJob.getId() + "pending to true");
            }*/
            if (slaStatus != null) {
                SLAEventBean slaEvent = SLADbOperations.createStatusEvent(coordAction.getSlaXml(), coordAction.getId(), slaStatus,
                        SlaAppType.COORDINATOR_ACTION, LOG);
                if(slaEvent != null) {
                    insertList.add(slaEvent);
                }
            }
            if (workflow.getStatus() != WorkflowJob.Status.SUSPENDED
                    && workflow.getStatus() != WorkflowJob.Status.RUNNING) {
                queue(new CoordActionReadyXCommand(coordAction.getJobId()));
            }

            jpaService.execute(new BulkUpdateInsertForCoordActionStatusJPAExecutor(updateList, insertList));
            if (EventHandlerService.isEnabled()) {
                generateEvent(coordAction, coordJob.getUser(), coordJob.getAppName(), workflow.getStartTime());
            }

            LOG.debug("ENDED CoordActionUpdateXCommand for wfId=" + workflow.getId());
View Full Code Here

Examples of org.apache.oozie.executor.jpa.BulkUpdateInsertForCoordActionStatusJPAExecutor

                    }
                    else {
                        LOG.warn("Unexpected workflow " + wf.getId() + " STATUS " + wf.getStatus());
                        coordAction.setLastModifiedTime(new Date());
                        updateList.add(coordAction);
                        jpaService.execute(new BulkUpdateInsertForCoordActionStatusJPAExecutor(updateList, null));
                        return null;
                    }
                }
            }

            LOG.debug("Updating Coordintaor actionId :" + coordAction.getId() + "status to ="
                            + coordAction.getStatus());
            coordAction.setLastModifiedTime(new Date());
            updateList.add(coordAction);

            if (slaStatus != null) {
                SLAEventBean slaEvent = SLADbOperations.createStatusEvent(coordAction.getSlaXml(), coordAction.getId(), slaStatus,
                        SlaAppType.COORDINATOR_ACTION, LOG);
                if(slaEvent != null) {
                    insertList.add(slaEvent);
                }
            }

            jpaService.execute(new BulkUpdateInsertForCoordActionStatusJPAExecutor(updateList, insertList));
            CoordinatorAction.Status endStatus = coordAction.getStatus();
            if (endStatus != initialStatus && EventHandlerService.isEnabled()) {
                generateEvent(coordAction, coordJob.getUser(), coordJob.getAppName(), workflowJob.getStartTime());
            }
        }
View Full Code Here

Examples of org.apache.oozie.executor.jpa.BulkUpdateInsertForCoordActionStatusJPAExecutor

                    }
                    else {
                        LOG.warn("Unexpected workflow " + wf.getId() + " STATUS " + wf.getStatus());
                        coordAction.setLastModifiedTime(new Date());
                        updateList.add(coordAction);
                        jpaService.execute(new BulkUpdateInsertForCoordActionStatusJPAExecutor(updateList, null));
                        return null;
                    }
                }
            }

            LOG.debug("Updating Coordintaor actionId :" + coordAction.getId() + "status to ="
                            + coordAction.getStatus());
            coordAction.setLastModifiedTime(new Date());
            updateList.add(coordAction);

            if (slaStatus != null) {
                SLAEventBean slaEvent = SLADbOperations.createStatusEvent(coordAction.getSlaXml(), coordAction.getId(), slaStatus,
                        SlaAppType.COORDINATOR_ACTION, LOG);
                if(slaEvent != null) {
                    insertList.add(slaEvent);
                }
            }

            jpaService.execute(new BulkUpdateInsertForCoordActionStatusJPAExecutor(updateList, insertList));
        }
        catch (XException ex) {
            LOG.warn("CoordActionCheckCommand Failed ", ex);
            throw new CommandException(ex);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.