GitHub user zsxwing opened a pull request:

    https://github.com/apache/spark/pull/12240

    [SPARK-14437][Core]Use the addres that NettyBlockTransferService listens to 
create BlockManagerId

    ## What changes were proposed in this pull request?
    
    Here is why SPARK-14437 happens:
    BlockManagerId is created using NettyBlockTransferService.hostName which 
comes from `customHostname`. And `Executor` will set `customHostname` to the 
hostname which is detected by the driver. However, the driver may not be able 
to detect the correct address in some complicated network. In such case, 
`BlockManagerId` will be created using a wrong hostname.
    
    To fix this issue, this PR uses `hostname` provided by `SparkEnv.create` to 
create `NettyBlockTransferService` and set `NettyBlockTransferService.hostname` 
to this one directly. A bonus of this approach is NettyBlockTransferService 
won't bound to `0.0.0.0` which is more safer.
    
    ## How was this patch tested?
    
    Manually checked the bound address using local-cluster. 


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zsxwing/spark SPARK-14437

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/12240.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #12240
    
----
commit 9037529b4d88c12a1ba6136697246e604e1fced8
Author: Shixiong Zhu <[email protected]>
Date:   2016-04-07T19:14:47Z

    Use the addres that NettyBlockTransferService listens to create 
BlockManagerId

----


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