Github user GraceH commented on the pull request:

    https://github.com/apache/spark/pull/9796#issuecomment-159774039
  
    @andrewor14 Yes. you are so right. Meanwhile it seems the original 
implementation has waited for a while to check if the replacement is there.  
According to you suggestion, I can add the `executor id comparison` here. And 
it is tested locally. What do you think? 
    
    ```Java
    val executors = getExecutorIds(sc)
        assert(executors.size === 2)
        // kill executor 1, and replace it
        assert(sc.killAndReplaceExecutor(executors.head))
        eventually(timeout(10.seconds), interval(10.millis)) {
          val apps = getApplications()
          assert(apps.head.executors.size === 2)
    +     // make sure the old executors head has been killedAndReplaced
    +     assert(executors.head != getExecutorIds(sc).head)
        }



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