dongjoon-hyun commented on code in PR #40645:
URL: https://github.com/apache/spark/pull/40645#discussion_r1186493926
##########
core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala:
##########
@@ -550,6 +550,44 @@ class SparkSubmitSuite
Files.delete(Paths.get("TestUDTF.jar"))
}
+ test("SPARK-43014: Set `spark.app.submitTime` if missing ") {
+ val clArgs1 = Seq(
+ "--deploy-mode", "client",
+ "--master", "k8s://host:port",
+ "--class", "org.SomeClass",
+ "/home/thejar.jar")
+ val appArgs1 = new SparkSubmitArguments(clArgs1)
+ val (_, _, conf1, _) = submit.prepareSubmitEnvironment(appArgs1)
+ conf1.getOption("spark.app.submitTime").isDefined should be(true)
+
+ val submitTime = 1234567.toString
+ val clArgs2 = Seq(
+ "--deploy-mode", "client",
+ "--master", "k8s://host:port",
+ "--class", "org.SomeClass",
+ "--conf", "spark.app.submitTime=" + submitTime,
+ "/home/thejar.jar")
+ val appArgs2 = new SparkSubmitArguments(clArgs2)
+ val (_, _, conf2, _) = submit.prepareSubmitEnvironment(appArgs2)
+ conf2.get("spark.app.submitTime") should be (submitTime)
+ }
+
+ test("SPARK-43014: Overwrite `spark.app.submitTime` in k8s cluster mode
driver " +
+ "when `spark.kubernetes.setSubmitTimeInDriver` is true") {
Review Comment:
We need to have a test case `false` instead of this because `true` is the
default, doesn't we?
```
val setSubmitTimeInClusterModeDriver =
sparkConf.getBoolean("spark.kubernetes.setSubmitTimeInDriver", true)
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]