srowen commented on a change in pull request #23445: [SPARK-26530]Validate 
heartheat arguments in HeartbeatReceiver
URL: https://github.com/apache/spark/pull/23445#discussion_r248310968
 
 

 ##########
 File path: 
core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala
 ##########
 @@ -301,6 +301,28 @@ private[deploy] class SparkSubmitArguments(args: 
Seq[String], env: Map[String, S
     if (proxyUser != null && principal != null) {
       error("Only one of --proxy-user or --principal can be provided.")
     }
+
+    // Ensure heartbeat arguments is valid.
+    val executorTimeoutMs =
+      Utils.timeStringAsMs(sparkProperties.getOrElse(
+        "spark.storage.blockManagerSlaveTimeoutMs",
+        s"${Utils.timeStringAsSeconds(
+          sparkProperties.getOrElse("spark.network.timeout", "120s"))}s"))
+    val executorHeartbeatIntervalMs = Utils.timeStringAsMs(
+      sparkProperties.getOrElse("spark.executor.heartbeatInterval", "10s"))
+    val checkTimeoutIntervalMs =
+      Utils.timeStringAsSeconds(sparkProperties.getOrElse(
+        "spark.network.timeoutInterval",
+        s"${Utils.timeStringAsMs(sparkProperties.getOrElse(
+          "spark.storage.blockManagerTimeoutIntervalMs", "60s"))}ms")) * 1000
+    if (checkTimeoutIntervalMs >= executorTimeoutMs) {
+      error(s"Incorrect heartbeat arguments, checkTimeoutIntervalMs should " +
+        s"less than executorTimeoutMs.")
+    }
+    if (executorHeartbeatIntervalMs >= checkTimeoutIntervalMs) {
 
 Review comment:
   Yeah looks like that config is migrated in 
https://github.com/apache/spark/pull/23416 ; let me try to get that merged. If 
it's held up, we can merge this and fix it in the other PR.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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