You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Kevin Sweeney <ke...@apache.org> on 2014/02/15 00:43:23 UTC

Review Request 18149: Cron predictor conformance test.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18149/
-----------------------------------------------------------

Review request for Aurora, Maxim Khutornenko and Bill Farner.


Bugs: AURORA-132
    https://issues.apache.org/jira/browse/AURORA-132


Repository: aurora


Description
-------

Cron predictor conformance test.

Quartz doesn't support "standard" cron syntax (as described in crontab(5)[1]) and deviates [2] in a lot of ways that would lock us into it. Some of the ways it varies include:
  * '00' is not a valid minute
  * day-of-week is 1-indexed instead of 0-indexed
  * it supports a seconds field, which is an unrealistic constraint for aurora to deliver
  * the common "* * * * *" pattern is invalid

Rather than adopt Quartz's syntax I propose introducing a translation layer that will allow users to write in the more familiar crontab syntax. This change adds test data that can be used as a conformance test - a valid CronPredictor implementation must both accept the same syntax and make the same predictions as those referenced here. In a future review I will introduce a Quartz cron subsystem that passes this test.

[1] http://unixhelp.ed.ac.uk/CGI/man-cgi?crontab+5
[2] http://quartz-scheduler.org/documentation/quartz-2.2.x/tutorials/tutorial-lesson-06


Diffs
-----

  src/main/java/org/apache/aurora/scheduler/cron/testing/AbstractCronIT.java d8c40222809f525ce485a002873f1fe9dedc2748 
  src/main/resources/org/apache/aurora/scheduler/cron/testing/cron-schedule-predictions.json PRE-CREATION 

Diff: https://reviews.apache.org/r/18149/diff/


Testing
-------

./gradlew build


Thanks,

Kevin Sweeney


Re: Review Request 18149: Cron predictor conformance test.

Posted by Bill Farner <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18149/#review34555
-----------------------------------------------------------

Ship it!


This is great, thanks!!

- Bill Farner


On Feb. 14, 2014, 11:43 p.m., Kevin Sweeney wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18149/
> -----------------------------------------------------------
> 
> (Updated Feb. 14, 2014, 11:43 p.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Bugs: AURORA-132
>     https://issues.apache.org/jira/browse/AURORA-132
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Cron predictor conformance test.
> 
> Quartz doesn't support "standard" cron syntax (as described in crontab(5)[1]) and deviates [2] in a lot of ways that would lock us into it. Some of the ways it varies include:
>   * '00' is not a valid minute
>   * day-of-week is 1-indexed instead of 0-indexed
>   * it supports a seconds field, which is an unrealistic constraint for aurora to deliver
>   * the common "* * * * *" pattern is invalid
> 
> Rather than adopt Quartz's syntax I propose introducing a translation layer that will allow users to write in the more familiar crontab syntax. This change adds test data that can be used as a conformance test - a valid CronPredictor implementation must both accept the same syntax and make the same predictions as those referenced here. In a future review I will introduce a Quartz cron subsystem that passes this test.
> 
> [1] http://unixhelp.ed.ac.uk/CGI/man-cgi?crontab+5
> [2] http://quartz-scheduler.org/documentation/quartz-2.2.x/tutorials/tutorial-lesson-06
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/cron/testing/AbstractCronIT.java d8c40222809f525ce485a002873f1fe9dedc2748 
>   src/main/resources/org/apache/aurora/scheduler/cron/testing/cron-schedule-predictions.json PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/18149/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build
> 
> 
> Thanks,
> 
> Kevin Sweeney
> 
>


Re: Review Request 18149: Cron predictor conformance test.

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18149/#review34556
-----------------------------------------------------------

Ship it!


Ship It!

- Maxim Khutornenko


On Feb. 14, 2014, 11:43 p.m., Kevin Sweeney wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18149/
> -----------------------------------------------------------
> 
> (Updated Feb. 14, 2014, 11:43 p.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Bugs: AURORA-132
>     https://issues.apache.org/jira/browse/AURORA-132
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Cron predictor conformance test.
> 
> Quartz doesn't support "standard" cron syntax (as described in crontab(5)[1]) and deviates [2] in a lot of ways that would lock us into it. Some of the ways it varies include:
>   * '00' is not a valid minute
>   * day-of-week is 1-indexed instead of 0-indexed
>   * it supports a seconds field, which is an unrealistic constraint for aurora to deliver
>   * the common "* * * * *" pattern is invalid
> 
> Rather than adopt Quartz's syntax I propose introducing a translation layer that will allow users to write in the more familiar crontab syntax. This change adds test data that can be used as a conformance test - a valid CronPredictor implementation must both accept the same syntax and make the same predictions as those referenced here. In a future review I will introduce a Quartz cron subsystem that passes this test.
> 
> [1] http://unixhelp.ed.ac.uk/CGI/man-cgi?crontab+5
> [2] http://quartz-scheduler.org/documentation/quartz-2.2.x/tutorials/tutorial-lesson-06
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/cron/testing/AbstractCronIT.java d8c40222809f525ce485a002873f1fe9dedc2748 
>   src/main/resources/org/apache/aurora/scheduler/cron/testing/cron-schedule-predictions.json PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/18149/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build
> 
> 
> Thanks,
> 
> Kevin Sweeney
> 
>