You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by zsxwing <gi...@git.apache.org> on 2016/05/02 18:02:21 UTC

[GitHub] spark pull request: [SPARK-14849][CORE]Always set an address for t...

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

    https://github.com/apache/spark/pull/12613#discussion_r61776444
  
    --- Diff: core/src/main/scala/org/apache/spark/rpc/netty/NettyRpcEnv.scala ---
    @@ -120,9 +120,15 @@ private[netty] class NettyRpcEnv(
           RpcEndpointVerifier.NAME, new RpcEndpointVerifier(this, dispatcher))
       }
     
    -  @Nullable
       override lazy val address: RpcAddress = {
    -    if (server != null) RpcAddress(host, server.getPort()) else null
    +    // When running in client mode (i.e.: not opening a listening port, but connecting to a
    +    // 'server' with an open port), the server value is null.
    +    // But a valid host still has to be provided, as it is needed later on.
    +    // Previously, the server side of the connection was attempting to guess the client
    +    // hostname, using the connection information. But the value generated is wrong when
    +    // the connection is NATed.
    +    // [SPARK-14849]
    +    if (server != null) RpcAddress(host, server.getPort()) else RpcAddress(host, -1)
    --- End diff --
    
    `-1` is actually confusing. All of executors in the same node will have the same address.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org