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

    https://github.com/apache/spark/pull/6457#discussion_r40034760
  
    --- Diff: core/src/main/scala/org/apache/spark/rpc/RpcEndpoint.scala ---
    @@ -101,38 +87,38 @@ private[spark] trait RpcEndpoint {
       }
     
       /**
    -   * Invoked before [[RpcEndpoint]] starts to handle any message.
    +   * Invoked when `remoteAddress` is connected to the current node.
        */
    -  def onStart(): Unit = {
    +  def onConnected(remoteAddress: RpcAddress): Unit = {
         // By default, do nothing.
       }
     
       /**
    -   * Invoked when [[RpcEndpoint]] is stopping.
    +   * Invoked when `remoteAddress` is lost.
        */
    -  def onStop(): Unit = {
    +  def onDisconnected(remoteAddress: RpcAddress): Unit = {
         // By default, do nothing.
       }
     
       /**
    -   * Invoked when `remoteAddress` is connected to the current node.
    +   * Invoked when some network error happens in the connection between the 
current node and
    +   * `remoteAddress`.
        */
    -  def onConnected(remoteAddress: RpcAddress): Unit = {
    +  def onNetworkError(cause: Throwable, remoteAddress: RpcAddress): Unit = {
         // By default, do nothing.
       }
     
       /**
    -   * Invoked when `remoteAddress` is lost.
    +   * Invoked before [[RpcEndpoint]] starts to handle any message.
        */
    -  def onDisconnected(remoteAddress: RpcAddress): Unit = {
    +  def onStart(): Unit = {
         // By default, do nothing.
       }
     
       /**
    -   * Invoked when some network error happens in the connection between the 
current node and
    -   * `remoteAddress`.
    +   * Invoked when [[RpcEndpoint]] is stopping.
    --- End diff --
    
    Could you clarify in this comment that code should not use `self` in this 
method, since it will be `null`?


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