Add a static function in LocalBackEnd to let it use spark.cores.max specified cores when no cores are passed to it
1 SparkContext MASTER=local pattern use default cores instead of 1 to construct LocalBackEnd , for use of spark-shell and cores specified in cmd line 2 some test case change from local to local[1]. 3 SparkContextSchedulerCreationSuite test spark.cores.max config in local pattern
1 LocalBackend not change 2 In SparkContext do some process to the cores and pass it to original LocalBackend constructor
SPARK-1099: Doc update for local mode using all cores by default
Fix unit tests

Changing number of cores for local mode broke some unit tests that incorrectly
relied on partition ordering. I fixed the Scala suite, but the Java suite would
require a lot more effort, so I just changed it to use local[1] explicitly.