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

Andras Salamon commented on OOZIE-3482:
---------------------------------------

It seems to me, that you fixed not one but two bugs:

1. Non-cron syntax: Checking if the coordinator can be materialized between 
start and end time.
 
  Do we really need this check? Isn't it true, that the coordinator will be 
materialized at least once: at the start time? 

2. cron-syntax: Checking if we the frequency is faster than five minutes. 

I have mixed feelings. It is a very good idea to check crontabs like (* * * * 
*), which is almost equals to the 1-minute old-style scheduling, it's quite 
confusing that we give error in old style and allow it in the new style.  Same 
goes for formats like 0/1, 0/2,... But wait about the following crontabs: 
(0,4 * * * *)? Every hour at 00 and 04? We have only 4 minutes between the 
runs, so we should give an error. But it only run twice in every hour, so we 
should not give and error.
(0,4 8 * * *)? 8:00 and 8:04 every day. Should we give an error?

What about formats like (0-59 * * * *)? I think we should give and error, did 
your patch catches it? What if I only use (0-5 * * * *)?






> Fix bug in CoordSubmitXCommand#validateCoordinatorJob
> -----------------------------------------------------
>
>                 Key: OOZIE-3482
>                 URL: https://issues.apache.org/jira/browse/OOZIE-3482
>             Project: Oozie
>          Issue Type: Bug
>            Reporter: Junfan Zhang
>            Assignee: Junfan Zhang
>            Priority: Major
>         Attachments: OOZIE-3482-1.patch
>
>
> The {{CoordSubmitXCommand#validateCoordinatorJob}} is to validate the 
> frequency, including that check if the frequency is faster than 5 min and 
> frequency is not invalid. But in OOZIE document, the frequency format can be 
> EL or crontab formual. In this {{validateCoordinatorJob}}, the logic of the 
> code is wrong.
> The related code is linked to 
> [gist|https://gist.github.com/zuston/2dbc699a207c4f65ecbca4f93206a132].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to