You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2020/05/18 05:57:19 UTC

[spark] 01/02: Revert "[SPARK-31746][YARN][TESTS] Show the actual error message in LocalityPlacementStrategySuite"

This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git

commit 88e00c367bccf51a343abae2ef734fa028c46f7b
Author: HyukjinKwon <gu...@apache.org>
AuthorDate: Mon May 18 14:55:31 2020 +0900

    Revert "[SPARK-31746][YARN][TESTS] Show the actual error message in LocalityPlacementStrategySuite"
    
    This reverts commit cbd8568ad7588cf14e5519c5aabf88d0b7fb0e33.
---
 .../spark/deploy/yarn/LocalityPlacementStrategySuite.scala     | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/LocalityPlacementStrategySuite.scala b/resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/LocalityPlacementStrategySuite.scala
index 3c77872..b7f2565 100644
--- a/resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/LocalityPlacementStrategySuite.scala
+++ b/resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/LocalityPlacementStrategySuite.scala
@@ -17,8 +17,7 @@
 
 package org.apache.spark.deploy.yarn
 
-import java.io.{PrintWriter, StringWriter}
-
+import scala.collection.JavaConverters._
 import scala.collection.mutable.{HashMap, HashSet, Set}
 
 import org.apache.hadoop.yarn.api.records._
@@ -46,11 +45,7 @@ class LocalityPlacementStrategySuite extends SparkFunSuite {
     thread.start()
     thread.join()
 
-    if (error != null) {
-      val errors = new StringWriter()
-      error.printStackTrace(new PrintWriter(errors))
-      fail(s"StackOverflowError should not be thrown; however, got:\n\n$errors")
-    }
+    assert(error === null)
   }
 
   private def runTest(): Unit = {
@@ -61,6 +56,7 @@ 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)
     val strategy = new LocalityPreferredContainerPlacementStrategy(new SparkConf(),
       yarnConf, resource, new MockResolver())
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org