You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/10/24 21:17:24 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #26161: [SPARK-27900][K8s] Add `spark.driver.killOnOOMError` flag in cluster mode

dongjoon-hyun commented on a change in pull request #26161: [SPARK-27900][K8s] Add `spark.driver.killOnOOMError` flag in cluster mode
URL: https://github.com/apache/spark/pull/26161#discussion_r338796387
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
 ##########
 @@ -787,6 +787,14 @@ private[spark] class SparkSubmit extends Logging {
     }
     sparkConf.set(SUBMIT_PYTHON_FILES, formattedPyFiles.split(",").toSeq)
 
+    // set oom error handling in cluster mode
+    if (sparkConf.get(KILL_ON_OOM_ERROR) && deployMode == CLUSTER) {
+      val driverJavaOptions = sparkConf.getOption(SparkLauncher.DRIVER_EXTRA_JAVA_OPTIONS)
+        .map( _ + " ")
+        .getOrElse("") + "-XX:OnOutOfMemoryError=\"kill -9 %p\""
 
 Review comment:
   Since this is a general PR for `SparkSubmit`, does this work on `Windows`?
   `ExitOnOutOfMemoryError` will be a better choice, @skonto .

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org