Skip to content

Commit 68c8925

Browse files
author
Marcelo Vanzin
committed
Feedback.
1 parent 16a99fc commit 68c8925

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/LocalityPlacementStrategySuite.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import scala.collection.mutable.{HashMap, HashSet, Set}
2222
import org.apache.hadoop.fs.CommonConfigurationKeysPublic
2323
import org.apache.hadoop.net.DNSToSwitchMapping
2424
import org.apache.hadoop.yarn.api.records._
25-
import org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest
2625
import org.apache.hadoop.yarn.conf.YarnConfiguration
2726
import org.mockito.Mockito._
2827

@@ -56,6 +55,11 @@ class LocalityPlacementStrategySuite extends SparkFunSuite {
5655
CommonConfigurationKeysPublic.NET_TOPOLOGY_NODE_SWITCH_MAPPING_IMPL_KEY,
5756
classOf[MockResolver], classOf[DNSToSwitchMapping])
5857

58+
// The numbers below have been chosen to balance being large enough to replicate the
59+
// original issue while not taking too long to run when the issue is fixed. The main
60+
// goal is to create enough requests for localized containers (so there should be many
61+
// tasks on several hosts that have no allocated containers).
62+
5963
val resource = Resource.newInstance(8 * 1024, 4)
6064
val strategy = new LocalityPreferredContainerPlacementStrategy(new SparkConf(),
6165
yarnConf, resource)

0 commit comments

Comments
 (0)