You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/05/01 08:41:31 UTC
[GitHub] [spark] eyalzit commented on a change in pull request #24382:
[SPARK-27330][SS] support task abort in foreach writer
eyalzit commented on a change in pull request #24382: [SPARK-27330][SS] support task abort in foreach writer
URL: https://github.com/apache/spark/pull/24382#discussion_r280026934
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/sources/ForeachWriterTable.scala
##########
@@ -139,16 +140,22 @@ class ForeachDataWriter[T](
} catch {
case t: Throwable =>
writer.close(t)
+ isClosed = true
throw t
}
}
override def commit(): WriterCommitMessage = {
writer.close(null)
+ isClosed = true
ForeachWriterCommitMessage
}
- override def abort(): Unit = {}
+ override def abort(): Unit = {
+ if (!isClosed) {
+ writer.close(new RuntimeException("For each writer has been aborted"))
Review comment:
Fixed
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org