pan3793 commented on code in PR #54618:
URL: https://github.com/apache/spark/pull/54618#discussion_r2885160646
##########
resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/ClientSuite.scala:
##########
@@ -755,6 +758,66 @@ class ClientSuite extends SparkFunSuite
env("SPARK_USER") should be ("overrideuser")
}
+ test("YARN AM JavaOptions") {
+ Seq("client", "cluster").foreach { deployMode =>
+ withTempDir { stagingDir =>
+ val sparkConf = new SparkConfWithEnv(
+ Map("SPARK_HOME" -> System.getProperty("spark.test.home")))
+ .set(SUBMIT_DEPLOY_MODE, deployMode)
+ .set(SparkLauncher.DRIVER_DEFAULT_JAVA_OPTIONS, "-Dx=1 -Dy=2")
+ .set(SparkLauncher.DRIVER_EXTRA_JAVA_OPTIONS, "-Dz=3")
+ .set(AM_DEFAULT_JAVA_OPTIONS, "-Da=1 -Db=2")
+ .set(AM_JAVA_OPTIONS, "-Dc=3")
+
+ val client = createClient(sparkConf)
+ val appIdField = classOf[Client]
+ .getDeclaredField("org$apache$spark$deploy$yarn$Client$$appId")
Review Comment:
I got this name by running
```
classOf[Client].getDeclaredFields.map(_.getName).foreach(println)
```
not much sure about the naming rules.
--
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]