Github user galv commented on a diff in the pull request: https://github.com/apache/spark/pull/21494#discussion_r193269255 --- Diff: core/src/test/scala/org/apache/spark/SparkContextSuite.scala --- @@ -627,6 +627,52 @@ class SparkContextSuite extends SparkFunSuite with LocalSparkContext with Eventu assert(exc.getCause() != null) stream.close() } + + test("support barrier sync under local mode") { + val conf = new SparkConf().setAppName("test").setMaster("local[2]") + sc = new SparkContext(conf) + val rdd = sc.makeRDD(Seq(1, 2, 3, 4), 2).barrier() + val rdd2 = rdd.mapPartitions { it => + val tc = TaskContext.get.asInstanceOf[org.apache.spark.barrier.BarrierTaskContext] + // If we don't get the expected taskInfos, the job shall abort due to stage failure. + if (tc.hosts().length != 2) { + throw new SparkException("Expected taksInfos length is 2, actual length is " + --- End diff -- `taksInfos` -> `taskInfos`
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org