Github user kayousterhout commented on a diff in the pull request: https://github.com/apache/spark/pull/16639#discussion_r100413764 --- Diff: core/src/test/scala/org/apache/spark/executor/ExecutorSuite.scala --- @@ -133,6 +123,153 @@ class ExecutorSuite extends SparkFunSuite { } } } + + test("SPARK-19276: Handle Fetch Failed for all intervening user code") { + val conf = new SparkConf().setMaster("local").setAppName("executor suite test") + sc = new SparkContext(conf) + + val serializer = SparkEnv.get.closureSerializer.newInstance() + val resultFunc = (context: TaskContext, itr: Iterator[Int]) => itr.size + val inputRDD = new FakeShuffleRDD(sc) + val secondRDD = new FetchFailureHidingRDD(sc, inputRDD) + val taskBinary = sc.broadcast(serializer.serialize((secondRDD, resultFunc)).array()) + val serializedTaskMetrics = serializer.serialize(TaskMetrics.registered).array() + val task = new ResultTask( + stageId = 1, + stageAttemptId = 0, + taskBinary = taskBinary, + partition = secondRDD.partitions(0), + locs = Seq(), + outputId = 0, + localProperties = new Properties(), + serializedTaskMetrics = serializedTaskMetrics + ) + + val serTask = serializer.serialize(task) + val taskDescription = fakeTaskDescription(serTask) + + + val failReason = runTaskAndGetFailReason(taskDescription) + assert(failReason.isInstanceOf[FetchFailed]) + } + + test("Gracefully handle error in task deserialization") { --- End diff -- is this test related to this PR? (seems useful but like it should be in its own PR?)
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org