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

Reply via email to