Github user vanzin commented on a diff in the pull request: https://github.com/apache/spark/pull/3082#discussion_r19779621 --- 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 -- `hadoopConf.getInt(shuffleServicePortKey, sparkPort)`?
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org