zhangshenghang commented on code in PR #10060:
URL: https://github.com/apache/seatunnel/pull/10060#discussion_r2592293929
##########
seatunnel-translation/seatunnel-translation-spark/seatunnel-translation-spark-2.4/src/main/java/org/apache/seatunnel/translation/spark/sink/writer/SparkDataWriter.java:
##########
@@ -114,15 +114,22 @@ public WriterCommitMessage commit() throws IOException {
@Override
public void abort() throws IOException {
- sinkWriter.abortPrepare();
- if (sinkCommitter != null) {
- if (latestCommitInfoT == null) {
- sinkCommitter.abort(Collections.emptyList());
- } else {
-
sinkCommitter.abort(Collections.singletonList(latestCommitInfoT));
+ try {
+ sinkWriter.abortPrepare();
+ if (sinkCommitter != null) {
+ if (latestCommitInfoT == null) {
+ sinkCommitter.abort(Collections.emptyList());
+ } else {
+
sinkCommitter.abort(Collections.singletonList(latestCommitInfoT));
+ }
}
+ cleanCommitInfo();
+ } catch (Throwable e) {
+ log.error("---> Abort spark writer throw error", e);
Review Comment:
```suggestion
log.error("Abort spark writer throw error", e);
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]