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_r324958917
 
 

 ##########
 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.
+        *
+        * <p>Supported time unit labels are:
 
 Review comment:
   Make sense. "refer it" means we keep the context at least in this pull 
request so that the origin of the change can be sourced. I just notice that it 
is already mentioned in the title and description :P

----------------------------------------------------------------
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

Reply via email to