Skip to content

Commit

Permalink
[Fix][Zeta] Remove duplicate LIFECYCLE_WRITER_CLOSE events
Browse files Browse the repository at this point in the history
  • Loading branch information
Hisoka-X committed Nov 5, 2024
1 parent c24f0bc commit 32907bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.apache.seatunnel.api.sink.MultiTableResourceManager;
import org.apache.seatunnel.api.sink.SinkWriter;
import org.apache.seatunnel.api.sink.SupportMultiTableSinkWriter;
import org.apache.seatunnel.api.sink.event.WriterCloseEvent;
import org.apache.seatunnel.api.table.event.SchemaChangeEvent;
import org.apache.seatunnel.api.table.type.SeaTunnelRow;
import org.apache.seatunnel.api.tracing.MDCTracer;
Expand Down Expand Up @@ -318,10 +317,6 @@ public void close() throws IOException {
(identifier, sinkWriter) -> {
try {
sinkWriter.close();
sinkWritersContext
.get(identifier)
.getEventListener()
.onEvent(new WriterCloseEvent());
} catch (Throwable e) {
if (firstE[0] == null) {
firstE[0] = e;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.seatunnel.api.sink.SinkWriter;
import org.apache.seatunnel.api.sink.SinkWriter.Context;
import org.apache.seatunnel.api.sink.SupportResourceShare;
import org.apache.seatunnel.api.sink.event.WriterCloseEvent;
import org.apache.seatunnel.api.sink.multitablesink.MultiTableSink;
import org.apache.seatunnel.api.table.catalog.CatalogTable;
import org.apache.seatunnel.api.table.catalog.TablePath;
Expand Down Expand Up @@ -174,6 +175,7 @@ private Address getCommitterTaskAddress() throws ExecutionException, Interrupted
public void close() throws IOException {
super.close();
writer.close();
writerContext.getEventListener().onEvent(new WriterCloseEvent());
try {
if (resourceManager != null) {
resourceManager.close();
Expand Down

0 comments on commit 32907bd

Please sign in to comment.