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

Purshotam Shah updated OOZIE-1818:
----------------------------------

    Description: 
{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}



  was:
{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 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}




> 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
>
> {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.2#6252)

Reply via email to