Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/3082#discussion_r19780190
--- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala
---
@@ -92,7 +93,19 @@ private[spark] class BlockManager(
private[spark]
val externalShuffleServiceEnabled =
conf.getBoolean("spark.shuffle.service.enabled", false)
- private val externalShuffleServicePort =
conf.getInt("spark.shuffle.service.port", 7337)
+
+ // In Yarn, the shuffle service port maybe set through the Hadoop config
+ private val shuffleServicePortKey = "spark.shuffle.service.port"
+ private val externalShuffleServicePort = {
+ val sparkPort = conf.getInt(shuffleServicePortKey, 7337)
+ if (SparkHadoopUtil.get.isYarnMode) {
+ val hadoopConf = SparkHadoopUtil.get.newConfiguration(conf)
+
Option(hadoopConf.get(shuffleServicePortKey)).map(_.toInt).getOrElse(sparkPort)
--- End diff --
oh cool I didn't realize Hadoop conf also has that
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]