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

 ##########
 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:
   Hm, why do we want all this? I think we want to standardize the behavior 
w.r.t. how a unitless number is interpreted, even if it means changing 
behavior. The behavior is currently inconsistent and I think it should be fixed.

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