[
https://issues.apache.org/jira/browse/OOZIE-1028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491046#comment-13491046
]
Robert Kanter commented on OOZIE-1028:
--------------------------------------
{quote}
CoordCommandUtils.java, line 197
shouldn't be an error if either of them is NULL?
if (startCal != null && endCal != null) {
{quote}
startCal and endCal are each determined by calling
CoordELFunctions.resolveOffsetRawTime(), which will log a warning if its going
to return null. Based on what I saw with the coord:current(int n) function, if
the Calendar is null we basically just ignore it. Is that incorrect?
----
For the 3 lines longer than 132 characters in the docs, its because the
test-patch checks lines that start with "+ " (e.g. "+ function(5);").
Normally, lines in the twiki files start with just "+" (e.g. "+some stuff about
something"), so the test-patch ignores the docs when considering long lines. I
used a list formatting, which requires three spaces at the start of the line,
so the test-patch is picking it up
One of the lines is this
{code}+ 2. There are multiple ways to express the same value (e.g.
${coord:offset(24, "HOUR")}= is equivalent to =${coord:offset(1, "DAY")}=){code}
Should I still change the 3 lines? (And what about the many other lines in the
twiki file longer than 132 chars that its not complaining about?)
----
{quote}
start-instance
is the patch rewinding or forwarding to the corresponding frequency tick?
Asking because the comment in the example seems to suggest a rewind but your
comment in the JIRA stated it would be doing a forward.
{quote}
Good catch; I got a little confused with the negative values. It should be
something between -40 and -59 inclusive. I'll fix that in the next patch I
upload.
> Add EL function to allow date ranges to be used for dataset ranges
> ------------------------------------------------------------------
>
> Key: OOZIE-1028
> URL: https://issues.apache.org/jira/browse/OOZIE-1028
> Project: Oozie
> Issue Type: New Feature
> Components: coordinator
> Affects Versions: trunk
> Reporter: Robert Kanter
> Assignee: Robert Kanter
> Fix For: trunk
>
> Attachments: OOZIE-1028.patch, OOZIE-1028.patch
>
>
> Dataset ranges are currently specified with EL functions such as
> {{${coord:current(int n)\}}}, which is basically returns the nominal datetime
> for the nth dataset instance relative to the coordinator action creation
> (materialization) time (in other words, it specifies a multiple of the
> dataset frequency). It would be useful to have a new function that lets
> users specify a date range offset instead of a frequency range offset.
> A new function, {{${coord:offset(int n, String timeUnit)\}}}, would be
> similar to the {{${coord:current(int n)\}}} function, except that the offset
> would be based on the TimeUnit (i.e. "MINUTE", "HOUR", "DAY", "MONTH", or
> "YEAR") instead of the frequency.
> For example, if the frequency was 1 day, then the following would all be
> equivalent:
> {{${coord:current(1)\}}}
> {{${coord:offset(1, "DAY")\}}}
> {{${coord:offset(24, "HOUR")\}}}
> {{${coord:offset(1440, "MINUTE")\}}}
> When specifying dataset instances, the resolved value of {{${coord:offset(int
> n, String timeUnit)\}}} would have to line up with an offset of a multiple of
> the frequency when used in an {{<instance>}} element.
> However, when used in {{<start-instance>}} and {{<end-instance>}}, the
> function would automatically resolve the range of instances to match the
> offset of a multiple of the frequency
> that would fall between the {{<start-instance>}} and {{<end-instance>}}. For
> example, if the frequency is 1 hour and the {{<start-instance>}} is
> {{${coord:offset(-90, "MINUTE")\}}} (-1.5 hours).
> then the {{<start-instance>}} would be effectively equivalent to
> {{${coord:offset(-60, "MINUTE")\}}} as we are dealing with a range.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira