Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@ public boolean useOldFetchProtocol() {
* 'org.apache.spark.network.shuffle.ExternalBlockHandler$NoOpMergedShuffleFileManager'.
* To turn on push-based shuffle at a cluster level, set the configuration to
* 'org.apache.spark.network.shuffle.RemoteBlockPushResolver'.
*
* Push-based shuffle is not yet supported.
*/
public String mergedShuffleFileManagerImpl() {
return conf.get("spark.shuffle.server.mergedShuffleFileManagerImpl",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ protected void serviceInit(Configuration externalConf) throws Exception {
TransportConf transportConf = new TransportConf("shuffle", new HadoopConfigProvider(_conf));
MergedShuffleFileManager shuffleMergeManager = newMergedShuffleFileManagerInstance(
transportConf);
if (!(shuffleMergeManager instanceof ExternalBlockHandler.NoOpMergedShuffleFileManager)) {
throw new UnsupportedOperationException("Push-based shuffle is not yet supported.");
}
blockHandler = new ExternalBlockHandler(
transportConf, registeredExecutorFile, shuffleMergeManager);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2098,7 +2098,7 @@ package object config {
"conjunction with the server side flag spark.shuffle.server.mergedShuffleFileManagerImpl " +
"which needs to be set with the appropriate " +
"org.apache.spark.network.shuffle.MergedShuffleFileManager implementation for push-based " +
"shuffle to be enabled")
"shuffle to be enabled. Push-based shuffle is not yet supported.")
.version("3.1.0")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This configuration is added at 3.1.0 and do we want to add comments like Push-based shuffle is not yet supported at 3.1.3?

Copy link
Contributor Author

@otterc otterc Jul 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 3.1, multiple critical pieces of push-based shuffle were not there, for example SPARK-32922, SPARK-32921, and SPARK-32920. So, even if anyone even tried to turn it on, it would just not work.
However, in 3.2 we are just missing 2 correctness fixes which involve modifying push-based shuffle protocols: #33078 and #33034. Without these 2 push-based shuffle still works but this is what we want to prevent.

Given this I don't think it makes any difference if we add these comments to branches of version < 3.2. WDYT?

.booleanConf
.createWithDefault(false)
Expand Down
6 changes: 5 additions & 1 deletion core/src/main/scala/org/apache/spark/util/Utils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2595,10 +2595,14 @@ private[spark] object Utils extends Logging {
* to run in YARN mode, with external shuffle service enabled
*/
def isPushBasedShuffleEnabled(conf: SparkConf): Boolean = {
conf.get(PUSH_BASED_SHUFFLE_ENABLED) &&
val isPushBasedShuffleEnabled = conf.get(PUSH_BASED_SHUFFLE_ENABLED) &&
(conf.get(IS_TESTING).getOrElse(false) ||
(conf.get(SHUFFLE_SERVICE_ENABLED) &&
conf.get(SparkLauncher.SPARK_MASTER, null) == "yarn"))
if (isPushBasedShuffleEnabled && !conf.get(IS_TESTING).getOrElse(false)) {
throw new UnsupportedOperationException("Push-based shuffle is not yet supported.")
}
isPushBasedShuffleEnabled
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.scalatest.matchers.should.Matchers._

import org.apache.spark._
import org.apache.spark.internal.config._
import org.apache.spark.internal.config.Tests.IS_TESTING
import org.apache.spark.network.TransportContext
import org.apache.spark.network.netty.{NettyBlockTransferService, SparkTransportConf}
import org.apache.spark.network.server.TransportServer
Expand Down Expand Up @@ -136,6 +137,7 @@ class HostLocalShuffleReadingSuite extends SparkFunSuite with Matchers with Loca

test("Enable host local shuffle reading when push based shuffle is enabled") {
val conf = new SparkConf()
.set(IS_TESTING, true)
.set(SHUFFLE_SERVICE_ENABLED, true)
.set("spark.yarn.maxAttempts", "1")
.set(PUSH_BASED_SHUFFLE_ENABLED, true)
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/scala/org/apache/spark/util/UtilsSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@ class UtilsSuite extends SparkFunSuite with ResetSystemProperties with Logging {
conf.set(SHUFFLE_SERVICE_ENABLED, true)
conf.set(SparkLauncher.SPARK_MASTER, "yarn")
conf.set("spark.yarn.maxAttempts", "1")
assert(Utils.isPushBasedShuffleEnabled(conf) === true)
assertThrows[UnsupportedOperationException](Utils.isPushBasedShuffleEnabled(conf))
conf.set("spark.yarn.maxAttempts", "2")
assert(Utils.isPushBasedShuffleEnabled(conf) === true)
}
Expand Down