Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/21927#discussion_r206594664
--- Diff:
core/src/test/scala/org/apache/spark/BarrierStageOnSubmittedSuite.scala ---
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark
+
+import scala.concurrent.duration._
+import scala.language.postfixOps
+
+import org.apache.spark.rdd.{PartitionPruningRDD, RDD}
+import org.apache.spark.util.ThreadUtils
+
+/**
+ * This test suite covers all the cases that shall fail fast on job
submitted that contains one
+ * of more barrier stages.
+ */
+class BarrierStageOnSubmittedSuite extends SparkFunSuite with
LocalSparkContext {
+
+ private def testSubmitJob(sc: SparkContext, rdd: RDD[Int], message:
String): Unit = {
+ val futureAction = sc.submitJob(
--- End diff --
Is it the same as the following?
~~~scala
private def testSubmitJob(rdd, message): Unit = {
val err = intercept[SparkException] {
rdd.count()
}.getCause.getMessage
assert(err.contain(message)
}
~~~
Okay to keep the current version if we do want to ensure this is from
`submitJob()`.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]