You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "f1sco (Jira)" <ji...@apache.org> on 2023/03/06 09:54:00 UTC
[jira] [Created] (YARN-11451) Datetime ISO 8601 parsing bug - Cluster Application Timeout Update API
f1sco created YARN-11451:
----------------------------
Summary: Datetime ISO 8601 parsing bug - Cluster Application Timeout Update API
Key: YARN-11451
URL: https://issues.apache.org/jira/browse/YARN-11451
Project: Hadoop YARN
Issue Type: Bug
Components: api, docs, documentation, restapi
Affects Versions: 3.3.4, 3.3.5
Reporter: f1sco
The API does not work reproducing with the same example as in the [docs|https://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html#Cluster_Application_Timeout_Update_API]. In particular, the problem looks to be in the way the ISO 8601 datetime is parsed through the [Times class|https://github.com/apache/hadoop/blob/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/Times.java].
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
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org