apache/spark — pull request #1525 by li-zhihui (2014-07-22 09:04:58+00:00)
Title: Fix race condition at SchedulerBackend.isReady in standalone mode

In SPARK-1946(PR #900), configuration spark.scheduler.minRegisteredExecutorsRatio was introduced. However, in standalone mode, there is a race condition where isReady() can return true because totalExpectedExecutors has not been correctly set.

Because expected executors is uncertain in standalone mode, the PR try to use CPU cores(--total-executor-cores) as expected resources to judge whether SchedulerBackend is ready.