dongjoon-hyun commented on a change in pull request #34381:
URL: https://github.com/apache/spark/pull/34381#discussion_r735790311
##########
File path:
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
##########
@@ -933,6 +933,11 @@ private[spark] class Client(
val javaOpts = ListBuffer[String]()
+ // SPARK-37106: To start AM with Java 17,
`JavaModuleOptions.defaultModuleOptions`
+ // is added by default. It will not affect Java 8 and Java 11 due to
existence of
+ // `-XX:+IgnoreUnrecognizedVMOptions`.
+ javaOpts += JavaModuleOptions.defaultModuleOptions()
+
Review comment:
Can we make this one liner?
```scala
- val javaOpts = ListBuffer[String]()
-
- // SPARK-37106: To start AM with Java 17,
`JavaModuleOptions.defaultModuleOptions`
- // is added by default. It will not affect Java 8 and Java 11 due to
existence of
- // `-XX:+IgnoreUnrecognizedVMOptions`.
+ val javaOpts = JavaModuleOptions.defaultModuleOptions()
```
--
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]