TisonKun commented on a change in pull request #9686: [FLINK-14069] [core]
Enable TimeUtils for all time units labels supported by scala Duration
URL: https://github.com/apache/flink/pull/9686#discussion_r324958440
##########
File path: flink-core/src/main/java/org/apache/flink/util/TimeUtils.java
##########
@@ -29,9 +33,23 @@
*/
public class TimeUtils {
+ private static final Map<String, ChronoUnit> LABEL_TO_UNIT_MAP =
Collections.unmodifiableMap(initMap());
+
/**
* Parse the given string to a java {@link Duration}.
- * The string is like "123ms", "321s", "12min" and such.
+ * The string is in format "{length value}{time unit label}", e.g.
"123ms", "321 s".
+ * If no time unit label is specified, it will be considered as
milliseconds.
Review comment:
Thanks for your explanation :-)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services