Skip to content

Commit ea764e0

Browse files
author
Andrew Or
committed
Connect to Yarn shuffle service only if it's enabled
1 parent 1bf5109 commit ea764e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ExecutorRunnable.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ class ExecutorRunnable(
8989

9090
ctx.setApplicationACLs(YarnSparkHadoopUtil.getApplicationAclsForYarn(securityMgr))
9191

92-
ctx.setServiceData(Map[String, ByteBuffer]("spark_shuffle" -> ByteBuffer.allocate(0)))
92+
// If external shuffle service is enabled, register with the
93+
// Yarn shuffle service already started on the node manager
94+
if (sparkConf.getBoolean("spark.shuffle.service.enabled", false)) {
95+
ctx.setServiceData(Map[String, ByteBuffer]("spark_shuffle" -> ByteBuffer.allocate(0)))
96+
}
9397

9498
// Send the start request to the ContainerManager
9599
nmClient.startContainer(container, ctx)

0 commit comments

Comments
 (0)