Github user squito commented on a diff in the pull request:
https://github.com/apache/spark/pull/16639#discussion_r101090765
--- 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 --
@mridulm pointed out this bug in an earlier version of this pr, so I fixed
the bug and added a test case. But in any case, I've separated this out into
https://github.com/apache/spark/pull/16930 /
https://issues.apache.org/jira/browse/SPARK-19597
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]