Mrhs121 commented on code in PR #10060:
URL: https://github.com/apache/seatunnel/pull/10060#discussion_r2536054703
##########
seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/DorisSinkWriter.java:
##########
@@ -225,11 +225,22 @@ private void startLoad(String label) {
@Override
public void abortPrepare() {
- if (dorisSinkConfig.getEnable2PC()) {
- try {
+ try {
+ if (dorisSinkConfig.getEnable2PC()) {
dorisStreamLoad.abortPreCommit(labelPrefix, lastCheckpointId +
1);
- } catch (Exception e) {
- throw new RuntimeException(e);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
Review Comment:
It is impossible to implement Closeable in Spark2.4, We are unable to modify
the interface of the execution engine.
The code differences between spark2 and spark3 are as follows.
spark2
https://github.com/apache/spark/blob/4be566062defa249435c4d72eb106fe7b933e023/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/WriteToDataSourceV2Exec.scala#L146-L153
spark3
https://github.com/apache/spark/blob/2f3e4e36017d16d67086fd4ecaf39636a2fb4b7c/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/WriteToDataSourceV2Exec.scala#L477
spark2
https://github.com/apache/spark/blob/4be566062defa249435c4d72eb106fe7b933e023/sql/core/src/main/java/org/apache/spark/sql/sources/v2/writer/DataWriter.java#L59
spark3
https://github.com/apache/spark/blob/2f3e4e36017d16d67086fd4ecaf39636a2fb4b7c/sql/catalyst/src/main/java/org/apache/spark/sql/connector/write/DataWriter.java#L63
--
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]