You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Purshotam Shah (JIRA)" <ji...@apache.org> on 2014/09/04 19:10:51 UTC

[jira] [Commented] (OOZIE-1818) CoordMaterializeTransitionXCommand verifyPrecondition doesn't verify current time

    [ https://issues.apache.org/jira/browse/OOZIE-1818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14121574#comment-14121574 ] 

Purshotam Shah commented on OOZIE-1818:
---------------------------------------

{quote}
We can have two services running simultaneously or immediately after other (CoordMaterializeTriggerService runs before CoordMaterializeTransitionXCommand DB update)
{quote}
This will be more visible in HA.

> CoordMaterializeTransitionXCommand verifyPrecondition doesn't verify current time
> ---------------------------------------------------------------------------------
>
>                 Key: OOZIE-1818
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1818
>             Project: Oozie
>          Issue Type: Bug
>            Reporter: Purshotam Shah
>            Assignee: Purshotam Shah
>
> {code}
>         Timestamp startTime = coordJob.getNextMaterializedTimestamp();
>         if (startTime == null) {
>             startTime = coordJob.getStartTimestamp();
>             if (startTime.after(new Timestamp(System.currentTimeMillis() + lookAheadWindow * 1000))) {
>                 throw new PreconditionException(ErrorCode.E1100, "CoordMaterializeTransitionXCommand for jobId="
>                         + jobId + " job's start time is not reached yet - nothing to materialize");
>             }
>         }
> {code}
> It should be should be
> {code}
>         Timestamp matTime = coordJob.getNextMaterializedTimestamp();
>         if (matTime == null) {
>             matTime = coordJob.getStartTimestamp();
>         }
>         if (matTime.after(new Timestamp(System.currentTimeMillis() + lookAheadWindow * 1000))) {
>                 throw new PreconditionException(ErrorCode.E1100, "CoordMaterializeTransitionXCommand for jobId="
>                         + jobId + "  Request is for future time");
>          }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)