Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-23546

Oozie coordinator Workflow Manager web view sends date in wrong format to backend

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • ambari-views
    • None

    Description

      Note: I've originally discovered this in the latest HDP version 2.6.4, which uses Ambari 2.6.1 afaik.

      When creating a coordinator job in the Workflow Manager, you can select a start and an end date. The problem is that the date is in the wrong format for the Oozie backend. When I click on a date/time in the calendar, it appears like this:

      "04/10/2018 03:55 PM"

      When submitting the coordinator job the following error appears in the log:

      used by: java.lang.IllegalArgumentException: parameter [end] = [04/10/2018 03:55 PM] must be Date in UTC format (yyyy-MM-dd'T'HH:mm'Z'). Parsing error java.text.ParseException: Could not parse [04/10/2018 03:55 PM] using [yyyy-MM-dd'T'HH:mm'Z'] mask
      

      From looking at the code it looks like the web interface uses the wrong date mask? See here for the JS from the workflow manager: https://github.com/apache/ambari/blame/trunk/contrib/views/wfmanager/src/main/resources/ui/app/components/date-with-expr.js#L55

      format: 'MM/DD/YYYY hh:mm A',
      

      The backend code checks against this date format: https://github.com/apache/oozie/blame/4a05898518af353a36465805099c947918bf7d50/core/src/main/java/org/apache/oozie/util/DateUtils.java#L46

      public static final String ISO8601_UTC_MASK = "yyyy-MM-dd'T'HH:mm'Z'";
      

      So the format does not match and thus the error.

      Attachments

        Activity

          People

            apappu@hortonworks.com amarnath reddy pappu
            fwein Frank Wein
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: