dongjoon-hyun commented on a change in pull request #25229: [SPARK-27900][K8s] 
Add jvm oom flag
URL: https://github.com/apache/spark/pull/25229#discussion_r310866554
 
 

 ##########
 File path: 
resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/BasicTestsSuite.scala
 ##########
 @@ -98,6 +98,28 @@ private[spark] trait BasicTestsSuite { k8sSuite: 
KubernetesSuite =>
       expectedJVMValue = Seq("(spark.test.foo,spark.test.bar)"))
   }
 
+  test("Run SparkPi without the default exit on OOM error flag", k8sTestTag) {
+    sparkAppConf
+      .set("spark.driver.extraJavaOptions", "-Dspark.test.foo=spark.test.bar")
+      .set("spark.kubernetes.driverEnv.DRIVER_VERBOSE", "true")
+      .set("spark.kubernetes.driverEnv.IGNORE_DEFAULT_DRIVER_JVM_OPTIONS", 
"true")
+
+    val output = Seq("Pi is roughly 3",
+      "(spark.driver.extraJavaOptions,-Dspark.test.foo=spark.test.bar)")
+
+    runSparkPiAndVerifyCompletion(expectedLogOnCompletion = output)
+  }
+
+  test("Run SparkPi with the default exit on OOM error flag set", k8sTestTag) {
+    sparkAppConf
+      .set("spark.driver.extraJavaOptions", "-Dspark.test.foo=spark.test.bar")
+      .set("spark.kubernetes.driverEnv.DRIVER_VERBOSE", "true")
+    val output = Seq("Pi is roughly 3",
+      "(spark.driver.extraJavaOptions,-XX:OnOutOfMemoryError=\"kill -9 %p\" " +
+        "-Dspark.test.foo=spark.test.bar)")
+    runSparkPiAndVerifyCompletion(expectedLogOnCompletion = output)
+  }
 
 Review comment:
   Thank you for adding these test cases.

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