Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-11451

Datetime ISO 8601 parsing bug - Cluster Application Timeout Update API



    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.3.5, 3.3.4
    • None
    • api, docs, documentation, restapi
    • None


      The API does not work reproducing with the same example as in the docs. In particular, the problem looks to be in the way the ISO 8601 datetime is parsed through the Times class.
      Currently the API to set the job timeout do not accept datetime with ":" in the timezone and those expanded to more than milliseconds.

      As per https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html:

      Offset Z: This formats the offset based on the number of pattern letters. One, two or three letters outputs the hour and minute, without a colon, such as '+0130'. The output will be '+0000' when the offset is zero. Four letters outputs the full form of localized offset, equivalent to four letters of Offset-O. The output will be the corresponding localized offset text if the offset is zero. Five letters outputs the hour, minute, with optional second if non-zero, with colon. It outputs 'Z' if the offset is zero. Six or more letters throws IllegalArgumentException.

      The ISO format that is used by YARN:
      static final String ISO8601_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
      indicates the offset, without colon, while the documentation includes examples with colon, which results in ParseException




            Unassigned Unassigned
            f1sco f1sco
            0 Vote for this issue
            1 Start watching this issue