ajithme commented on a change in pull request #24140: [SPARK-27198][core] 
Heartbeat interval mismatch in driver and executor
URL: https://github.com/apache/spark/pull/24140#discussion_r267903225
 
 

 ##########
 File path: 
common/network-common/src/main/java/org/apache/spark/network/util/JavaUtils.java
 ##########
 @@ -226,6 +226,14 @@ private static boolean isSymlink(File file) throws 
IOException {
    * The unit is also considered the default if the given string does not 
specify a unit.
    */
   public static long timeStringAs(String str, TimeUnit unit) {
+    return timeStringAs(str, unit, unit);
+  }
+
+  /**
+   * Convert a passed time string (e.g. 50s, 100ms, or 250us) to a time count 
in the given unit.
+   * defaultUnit is used for string which have just number and no units 
mentioned
+   */
+  public static long timeStringAs(String str, TimeUnit unit, TimeUnit 
defaultUnit) {
 
 Review comment:
   so i see two options
   1. Handle all other time related configurations also to fall back as 
milliseconds by default when units are not mentioned
   2. Or disallow any time related configuration to be configured without 
specifying unit
   
   Please suggest which one i can proceed with.?

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to