zjuwangg commented on code in PR #48963:
URL: https://github.com/apache/spark/pull/48963#discussion_r1867157636
##########
core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala:
##########
@@ -479,6 +479,32 @@ private[spark] object CoarseGrainedExecutorBackend extends
Logging {
driverConf.set(EXECUTOR_ID, arguments.executorId)
cfg.logLevel.foreach(logLevel => Utils.setLogLevelIfNeeded(logLevel))
+ // Set executor memory related config here according to resource profile
+ if (cfg.resourceProfile.id !=
ResourceProfile.DEFAULT_RESOURCE_PROFILE_ID) {
+ cfg.resourceProfile
+ .executorResources
+ .foreach {
+ case (ResourceProfile.OFFHEAP_MEM, request) =>
+ driverConf.set(MEMORY_OFFHEAP_SIZE.key, request.amount.toString
+ "m")
+ if (request.amount > 0) {
+ driverConf.set(MEMORY_OFFHEAP_ENABLED.key, "true")
Review Comment:
> this is questionable to me, we haven't supported setting confs yet so I
would expect it to pick up the default config for this. I'd rather see a
separate issue if we want to revisit this behavior.
Make sense to me. I'll address it later, how about introducing a config to
control whether to control offheap enabled or not?
--
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]