Skip to content

Commit 27e5c87

Browse files
author
Alexander Bessonov
committed
Rename spark.shuffle.service.name to spark.yarn.shuffle.service.name and move that option to appropriate place
1 parent 30f8c1d commit 27e5c87

File tree

7 files changed

+15
-13
lines changed

7 files changed

+15
-13
lines changed

common/network-yarn/src/main/java/org/apache/spark/network/yarn/YarnShuffleService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public YarnShuffleService() {
139139
this("spark_shuffle");
140140
}
141141

142-
public YarnShuffleService(String serviceName) {
142+
protected YarnShuffleService(String serviceName) {
143143
super(serviceName);
144144
logger.info("Initializing YARN shuffle service for Spark");
145145
instance = this;

core/src/main/scala/org/apache/spark/internal/config/package.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,6 @@ package object config {
443443
private[spark] val SHUFFLE_SERVICE_PORT =
444444
ConfigBuilder("spark.shuffle.service.port").intConf.createWithDefault(7337)
445445

446-
private[spark] val SHUFFLE_SERVICE_NAME =
447-
ConfigBuilder("spark.shuffle.service.name").stringConf.createWithDefault("spark_shuffle")
448-
449446
private[spark] val KEYTAB = ConfigBuilder("spark.kerberos.keytab")
450447
.doc("Location of user's keytab.")
451448
.stringConf.createOptional

docs/configuration.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -865,13 +865,6 @@ Apart from these, the following properties are also available, and may be useful
865865
configuration and setup documentation</a> for more information.
866866
</td>
867867
</tr>
868-
<tr>
869-
<td><code>spark.shuffle.service.name</code></td>
870-
<td>spark_shuffle</td>
871-
<td>
872-
Name of the external shuffle service.
873-
</td>
874-
</tr>
875868
<tr>
876869
<td><code>spark.shuffle.service.port</code></td>
877870
<td>7337</td>

docs/running-on-yarn.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,13 @@ To use a custom metrics.properties for the application master and executors, upd
492492
If it is not set then the YARN application ID is used.
493493
</td>
494494
</tr>
495+
<tr>
496+
<td><code>spark.yarn.shuffle.service.name</code></td>
497+
<td><code>spark_shuffle</code></td>
498+
<td>
499+
Name of the external shuffle service.
500+
</td>
501+
</tr>
495502
</table>
496503

497504
#### Available patterns for SHS custom executor log URL

resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ExecutorRunnable.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import org.apache.hadoop.yarn.ipc.YarnRPC
3737
import org.apache.hadoop.yarn.util.Records
3838

3939
import org.apache.spark.{SecurityManager, SparkConf, SparkException}
40+
import org.apache.spark.deploy.yarn.config._
4041
import org.apache.spark.internal.Logging
4142
import org.apache.spark.internal.config._
4243
import org.apache.spark.network.util.JavaUtils
@@ -115,7 +116,7 @@ private[yarn] class ExecutorRunnable(
115116
// Authentication is not enabled, so just provide dummy metadata
116117
ByteBuffer.allocate(0)
117118
}
118-
val serviceName = sparkConf.get(SHUFFLE_SERVICE_NAME)
119+
val serviceName = sparkConf.get(YARN_SHUFFLE_SERVICE_NAME)
119120
ctx.setServiceData(Collections.singletonMap(serviceName, secretBytes))
120121
}
121122

resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/config.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,4 +320,8 @@ package object config {
320320
private[yarn] val YARN_DRIVER_RESOURCE_TYPES_PREFIX = "spark.yarn.driver.resource."
321321
private[yarn] val YARN_AM_RESOURCE_TYPES_PREFIX = "spark.yarn.am.resource."
322322

323+
324+
private[yarn] val YARN_SHUFFLE_SERVICE_NAME = ConfigBuilder("spark.yarn.shuffle.service.name")
325+
.stringConf
326+
.createWithDefault("spark_shuffle")
323327
}

resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnShuffleIntegrationSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class YarnShuffleIntegrationSuite extends BaseYarnClusterSuite {
5555
logInfo("Shuffle service port = " + shuffleServicePort)
5656

5757
Map(
58-
SHUFFLE_SERVICE_NAME.key -> "spark2_shuffle",
58+
YARN_SHUFFLE_SERVICE_NAME.key -> "spark2_shuffle",
5959
SHUFFLE_SERVICE_ENABLED.key -> "true",
6060
SHUFFLE_SERVICE_PORT.key -> shuffleServicePort.toString,
6161
MAX_EXECUTOR_FAILURES.key -> "1"

0 commit comments

Comments
 (0)