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_r267930147
##########
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:
Let's not disallow unit-less time, not here, though I think that's
reasonable to consider separately for Spark 3. Here I think we should just
focus on fixing the inconsistency in handling this one parameter, and make it
consistent with how it's handled in master. I don't think we need more than a
few lines of change for that.
----------------------------------------------------------------
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]