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

    https://github.com/apache/spark/pull/6205#discussion_r31775768
  
    --- Diff: core/src/main/scala/org/apache/spark/rpc/akka/AkkaRpcEnv.scala ---
    @@ -214,8 +213,10 @@ private[spark] class AkkaRpcEnv private[akka] (
     
       override def asyncSetupEndpointRefByURI(uri: String): 
Future[RpcEndpointRef] = {
         import actorSystem.dispatcher
    -    actorSystem.actorSelection(uri).resolveOne(defaultLookupTimeout).
    -      map(new AkkaRpcEndpointRef(defaultAddress, _, conf))
    +    defaultLookupTimeout.addMessageIfTimeout(
    +      actorSystem.actorSelection(uri).resolveOne(_).
    +        map(new AkkaRpcEndpointRef(defaultAddress, _, conf))
    +    )
    --- End diff --
    
    I was trying to avoid calling `addMessageIfTimeout` and also still having 
to reference the `timeout.duration`.  Otherwise, the call would look like this
    ```scala
    defaultLookupTimeout.addMessageIfTimeout(
      actorSystem.actorSelection(uri).resolveOne( defaultLookupTimeout.duration 
).
        map(new AkkaRpcEndpointRef(defaultAddress, _, conf))
    )
    ```
    but as it is, it does look kind of confusing, so I'm not sure what is better


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