This would require creating the event bus and the scheduler before SparkEnv, since SparkEnv creates all the block manager classes. This is not possible, however, since the DAGScheduler depends on the block manager and the map output tracker.