Github user tgravescs commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7943#discussion_r36305928
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala 
---
    @@ -93,8 +93,15 @@ private[spark] class BlockManager(
     
       // Port used by the external shuffle service. In Yarn mode, this may be 
already be
       // set through the Hadoop configuration as the server is launched in the 
Yarn NM.
    -  private val externalShuffleServicePort =
    -    Utils.getSparkOrYarnConfig(conf, "spark.shuffle.service.port", 
"7337").toInt
    +  private val externalShuffleServicePort = {
    +    val t = Utils.getSparkOrYarnConfig(conf, "spark.shuffle.service.port", 
"7337").toInt
    +    if (t == 0) {
    +      // this is just for testing, when the yarn conf is set to 0 to find 
an open port
    --- End diff --
    
    It took me a bit to figure out what was going on here so we might want to 
put a more dsecriptive comment.  I guess if you set the yarn port to 0 for it 
to pick ephemeral then a user has to set the sparkconf 
spark.shuffle.service.port in their application config so it knows where the 
shuffle service is.
    
    I filed another jira to document spark.shuffle.service.port since its not 
documented anywhere, but I think it would be good to expand the comment here to 
be something what I said above.  If you are in here it might be nice to rename 
t to be something more descriptive.. port, tmpPort



---
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]

Reply via email to