apache/spark — pull request #900 by li-zhihui (2014-05-28 06:18:43+00:00)
Title: submit stage after (configured ratio of) executors have been registered

Because creating TaskSetManager and registering executors are asynchronous, in most situation, early stages' tasks run without preferred locality.

A simple solution is sleeping few seconds in application, so that executors have enough time to register.

The PR add 2 configuration properties to make DAGScheduler submit stage after a few of executors have been registered.

# submit stage only after successfully registered executors arrived the ratio, default value 0
spark.executor.registeredRatio = 0.8

# whatever registeredRatio is arrived, submit stage after the maxRegisteredWaitingTime(millisecond), default value 10000
spark.executor.maxRegisteredWaitingTime = 5000