dongjoon-hyun commented on a change in pull request #26312: [SPARK-29649][SQL]
Stop task set if FileAlreadyExistsException was thrown when writing to output
file
URL: https://github.com/apache/spark/pull/26312#discussion_r344471478
##########
File path:
core/src/test/scala/org/apache/spark/scheduler/TaskSetManagerSuite.scala
##########
@@ -1775,4 +1776,25 @@ class TaskSetManagerSuite extends SparkFunSuite with
LocalSparkContext with Logg
assert(!manager.checkSpeculatableTasks(0))
assert(manager.resourceOffer("exec1", "host1", ANY).isEmpty)
}
+
+ test("TaskOutputFileAlreadyExistException lead to task set abortion") {
+ sc = new SparkContext("local", "test")
+ sched = new FakeTaskScheduler(sc, ("exec1", "host1"))
+ val taskSet = FakeTask.createTaskSet(1)
+ val clock = new ManualClock
+ clock.advance(1)
+ val manager = new TaskSetManager(sched, taskSet, MAX_TASK_FAILURES, clock
= clock)
+
+ val offerResult = manager.resourceOffer("exec1", "host1", ANY)
+ assert(offerResult.isDefined,
+ "Expect resource offer on iteration %s to return a task".format(0))
Review comment:
Do you want "Expect resource offer on iteration 0 to return a task" simply?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]