Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-1028

Add EL function to allow date ranges to be used for dataset ranges

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • trunk
    • 3.3.2
    • coordinator
    • None

    Description

      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.

      Attachments

        1. OOZIE-1028.patch
          49 kB
          Robert Kanter
        2. OOZIE-1028.patch
          50 kB
          Robert Kanter
        3. OOZIE-1028.patch
          50 kB
          Robert Kanter
        4. OOZIE-1028.patch
          50 kB
          Robert Kanter

        Activity

          People

            rkanter Robert Kanter
            rkanter Robert Kanter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: