GitHub user jinxing64 opened a pull request: https://github.com/apache/spark/pull/20781
[SPARK-23637][YARN]Yarn might allocate more resource if a same executor is killed multiple times. ## What changes were proposed in this pull request? `YarnAllocator` uses `numExecutorsRunning` to track the number of running executor. `numExecutorsRunning` is used to check if there're executors missing and need to allocate more. In current code, `numExecutorsRunning` can be negative when driver asks to kill a same idle executor multiple times. ## How was this patch tested? UT added You can merge this pull request into a Git repository by running: $ git pull https://github.com/jinxing64/spark SPARK-23637 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/20781.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #20781 ---- commit bd6f8a1dd608d95f6faf2758cbd36e6328f48eb3 Author: jinxing <jinxing6042@...> Date: 2018-03-09T05:53:10Z [SPARK-23637][YARN]Yarn might allocate more resource if a same executor is killed multiple times. ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org