[ 
https://issues.apache.org/jira/browse/OOZIE-2862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andras Piros updated OOZIE-2862:
--------------------------------
    Description: 
{code:title=CoordChangeXCommand.java}
if (jobStatus != null) {
    coordJob.setStatus(jobStatus);
    LOG.info("Coord status is changed to " + jobStatus + " from " + prevStatus);
    if (jobStatus.equals(CoordinatorJob.Status.RUNNING)) {
        coordJob.setPending();
        if (coordJob.getNextMaterializedTime() != null
                && 
coordJob.getEndTime().after(coordJob.getNextMaterializedTime())) {
            coordJob.resetDoneMaterialization();
        }
    } else if (jobStatus.equals(CoordinatorJob.Status.IGNORED)) {
        coordJob.resetPending();
        coordJob.setDoneMaterialization();
    }
}
{code}

If the job was killed without creating any action, then 
{{coordJob.getNextMaterializedTime()}} will be null and change command will not 
reset done materialization. 

  was:
{code:title=CoordChangeXCommand.java}
if (jobStatus != null) {
                coordJob.setStatus(jobStatus);
                LOG.info("Coord status is changed to " + jobStatus + " from " + 
prevStatus);
                if (jobStatus.equals(CoordinatorJob.Status.RUNNING)) {
                    coordJob.setPending();
                    if (coordJob.getNextMaterializedTime() != null
                            && 
coordJob.getEndTime().after(coordJob.getNextMaterializedTime())) {
                        coordJob.resetDoneMaterialization();
                    }
                } else if (jobStatus.equals(CoordinatorJob.Status.IGNORED)) {
                    coordJob.resetPending();
                    coordJob.setDoneMaterialization();
                }
            }
{code}

If the job was killed without creating any action, then 
coordJob.getNextMaterializedTime() will be null and change command will not 
rest done materialization. 


> Coord change command doesn't change job to running if job was killed without 
> creating any actions
> -------------------------------------------------------------------------------------------------
>
>                 Key: OOZIE-2862
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2862
>             Project: Oozie
>          Issue Type: Bug
>            Reporter: Purshotam Shah
>            Assignee: Purshotam Shah
>         Attachments: OOZIE-2862-V1.patch, OOZIE-2862-V2.patch
>
>
> {code:title=CoordChangeXCommand.java}
> if (jobStatus != null) {
>     coordJob.setStatus(jobStatus);
>     LOG.info("Coord status is changed to " + jobStatus + " from " + 
> prevStatus);
>     if (jobStatus.equals(CoordinatorJob.Status.RUNNING)) {
>         coordJob.setPending();
>         if (coordJob.getNextMaterializedTime() != null
>                 && 
> coordJob.getEndTime().after(coordJob.getNextMaterializedTime())) {
>             coordJob.resetDoneMaterialization();
>         }
>     } else if (jobStatus.equals(CoordinatorJob.Status.IGNORED)) {
>         coordJob.resetPending();
>         coordJob.setDoneMaterialization();
>     }
> }
> {code}
> If the job was killed without creating any action, then 
> {{coordJob.getNextMaterializedTime()}} will be null and change command will 
> not reset done materialization. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to