You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/09/13 18:07:38 UTC

[GitHub] [spark] rmcyang commented on a change in pull request #33976: [SPARK-36705][SHUFFLE] Disable push based shuffle when IO encryption is enabled or serializer is not relocatable

rmcyang commented on a change in pull request #33976:
URL: https://github.com/apache/spark/pull/33976#discussion_r707567642



##########
File path: core/src/main/scala/org/apache/spark/util/Utils.scala
##########
@@ -2597,14 +2597,29 @@ private[spark] object Utils extends Logging {
   }
 
   /**
-   * Push based shuffle can only be enabled when the application is submitted
-   * to run in YARN mode, with external shuffle service enabled
+   * Push based shuffle can only be enabled when below conditions are met:
+   *   - the application is submitted to run in YARN mode
+   *   - external shuffle service enabled
+   *   - IO encryption disabled
+   *   - serializer(such as KryoSerializer) supports relocation of serialized objects
    */
   def isPushBasedShuffleEnabled(conf: SparkConf): Boolean = {
-    conf.get(PUSH_BASED_SHUFFLE_ENABLED) &&
-      (conf.get(IS_TESTING).getOrElse(false) ||
-        (conf.get(SHUFFLE_SERVICE_ENABLED) &&
-          conf.get(SparkLauncher.SPARK_MASTER, null) == "yarn"))
+    val serializer = Utils.classForName(conf.get(SERIALIZER)).getConstructor(classOf[SparkConf])
+      .newInstance(conf).asInstanceOf[Serializer]
+    val doPushBasedShuffle =
+      conf.get(PUSH_BASED_SHUFFLE_ENABLED) &&
+        (conf.get(IS_TESTING).getOrElse(false) ||
+          (conf.get(SHUFFLE_SERVICE_ENABLED) &&
+            conf.get(SparkLauncher.SPARK_MASTER, null) == "yarn" &&
+            !conf.get(IO_ENCRYPTION_ENABLED) &&
+            serializer.supportsRelocationOfSerializedObjects))

Review comment:
       Created SPARK-36744 under SPARK-33235.




-- 
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-unsubscribe@spark.apache.org

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



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