mridulm commented on code in PR #43627:
URL: https://github.com/apache/spark/pull/43627#discussion_r1386033849


##########
core/src/main/scala/org/apache/spark/executor/Executor.scala:
##########
@@ -329,14 +329,22 @@ private[spark] class Executor(
     }
   updateDependencies(initialUserFiles, initialUserJars, initialUserArchives, 
defaultSessionState)
 
-  // Plugins need to load using a class loader that includes the executor's 
user classpath.
-  // Plugins also needs to be initialized after the heartbeater started
-  // to avoid blocking to send heartbeat (see SPARK-32175).
+  // Plugins and shuffle managers need to load using a class loader that 
includes the executor's
+  // user classpath. Plugins also needs to be initialized after the 
heartbeater started
+  // to avoid blocking to send heartbeat (see SPARK-32175 and SPARK-45762).
   private val plugins: Option[PluginContainer] =
     Utils.withContextClassLoader(defaultSessionState.replClassLoader) {
       PluginContainer(env, resources.asJava)
     }
 
+  private val shuffleManager =
+    Utils.withContextClassLoader(defaultSessionState.replClassLoader) {
+      ShuffleManager.create(conf, true)
+    }
+
+  env.setShuffleManager(shuffleManager)
+  env.blockManager.setShuffleManager(shuffleManager)

Review Comment:
   ```suggestion
     if (! isLocal) {
       Utils.withContextClassLoader(defaultSessionState.replClassLoader) {
         env.initiailzeShuffleManager()
       }
     }
   ```
   
   I have not tested this, but I think this should work. If it does not, most 
of my suggestions will need to be discarded :-)



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to