Skip to content

Commit 829c33a

Browse files
yhuairxin
authored andcommitted
[SPARK-10087] [CORE] [BRANCH-1.5] Disable spark.shuffle.reduceLocality.enabled by default.
https://issues.apache.org/jira/browse/SPARK-10087 In some cases, when spark.shuffle.reduceLocality.enabled is enabled, we are scheduling all reducers to the same executor (the cluster has plenty of resources). Changing spark.shuffle.reduceLocality.enabled to false resolve the problem. Comments of #8280 provide more details of the symptom of this issue. This PR changes the default setting of `spark.shuffle.reduceLocality.enabled` to `false` for branch 1.5. Author: Yin Huai <[email protected]> Closes #8296 from yhuai/setNumPartitionsCorrectly-branch1.5.
1 parent 1038f67 commit 829c33a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class DAGScheduler(
138138

139139
// Flag to control if reduce tasks are assigned preferred locations
140140
private val shuffleLocalityEnabled =
141-
sc.getConf.getBoolean("spark.shuffle.reduceLocality.enabled", true)
141+
sc.getConf.getBoolean("spark.shuffle.reduceLocality.enabled", false)
142142
// Number of map, reduce tasks above which we do not assign preferred locations
143143
// based on map output sizes. We limit the size of jobs for which assign preferred locations
144144
// as computing the top locations by size becomes expensive.

core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ class DAGSchedulerSuite
909909
assertDataStructuresEmpty()
910910
}
911911

912-
test("reduce tasks should be placed locally with map output") {
912+
ignore("reduce tasks should be placed locally with map output") {
913913
// Create an shuffleMapRdd with 1 partition
914914
val shuffleMapRdd = new MyRDD(sc, 1, Nil)
915915
val shuffleDep = new ShuffleDependency(shuffleMapRdd, null)
@@ -929,7 +929,7 @@ class DAGSchedulerSuite
929929
assertDataStructuresEmpty()
930930
}
931931

932-
test("reduce task locality preferences should only include machines with largest map outputs") {
932+
ignore("reduce task locality preferences should only include machines with largest map outputs") {
933933
val numMapTasks = 4
934934
// Create an shuffleMapRdd with more partitions
935935
val shuffleMapRdd = new MyRDD(sc, numMapTasks, Nil)

0 commit comments

Comments
 (0)