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

 ##########
 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:
   I suggest some renaming:
   - unit => targetUnit
   - defaultUnit => defaultSourceUnit

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