Skip to content

Commit

Permalink
[Hotfix][Connector-V2] Release resources when task is closed for iceb…
Browse files Browse the repository at this point in the history
…erg sinkwriter (apache#7729)
  • Loading branch information
dailai authored Sep 24, 2024
1 parent 5ddf8d4 commit ff28118
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,15 @@ public List<IcebergSinkState> snapshotState(long checkpointId) throws IOExceptio
public void abortPrepare() {}

@Override
public void close() throws IOException {}
public void close() throws IOException {
try {
if (writer != null) {
writer.close();
}
} finally {
results.clear();
}
}

private String fieldsInfo(SeaTunnelRowType seaTunnelRowType) {
String[] fieldsInfo = new String[seaTunnelRowType.getTotalFields()];
Expand Down

0 comments on commit ff28118

Please sign in to comment.