mridulm commented on code in PR #43627:
URL: https://github.com/apache/spark/pull/43627#discussion_r1386016225
##########
core/src/main/scala/org/apache/spark/SparkEnv.scala:
##########
@@ -185,6 +191,10 @@ class SparkEnv (
releasePythonWorker(
pythonExec, workerModule, PythonWorkerFactory.defaultDaemonModule,
envVars, worker)
}
+
+ private[spark] def setShuffleManager(shuffleManager: ShuffleManager): Unit =
{
+ _shuffleManager = shuffleManager
+ }
Review Comment:
Instead of setting it, expose an initialize method.
In driver, we should directly set the variable as part of create - while we
use `initializeShuffleManager` for executor after classpath has been fixed up
(see more below in comment for `shuffleBlockGetterFn`).
```suggestion
private[spark] def initiailzeShuffleManager(): Unit = {
Preconditions.checkState(null == _shuffleManager,
"Shuffle manager already initialized to %s", _shuffleManager)
_shuffleManager = ShuffleManager.create(conf, executorId ==
SparkContext.DRIVER_IDENTIFIER)
}
```
--
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]