Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

package org.apache.spark.deploy.yarn

import scala.collection.JavaConverters._
import java.io.{PrintWriter, StringWriter}

import scala.collection.mutable.{HashMap, HashSet, Set}

import org.apache.hadoop.yarn.api.records._
Expand Down Expand Up @@ -46,7 +47,11 @@ class LocalityPlacementStrategySuite extends SparkFunSuite {
thread.start()
thread.join()

assert(error === null)
if (error != null) {
val errors = new StringWriter()
error.printStackTrace(new PrintWriter(errors))
fail(s"StackOverflowError should not be thrown; however, got:\n\n$errors")
}
}

private def runTest(): Unit = {
Expand All @@ -57,7 +62,6 @@ class LocalityPlacementStrategySuite extends SparkFunSuite {
// goal is to create enough requests for localized containers (so there should be many
// tasks on several hosts that have no allocated containers).

val resource = Resource.newInstance(8 * 1024, 4)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, yeah. Seems it's used in the branch-3.0. I will fix.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be fixed now. thanks for pointing out quickly.

val strategy = new LocalityPreferredContainerPlacementStrategy(new SparkConf(),
yarnConf, new MockResolver())

Expand Down