Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ public void processElement(StreamRecord<ClusteringPlanEvent> element) throws Exc
}

@Override
public void close() {
public void close() throws Exception {
if (null != this.executor) {
this.executor.close();
}
if (this.writeClient != null) {
this.writeClient.cleanHandlesGracefully();
this.writeClient.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,16 @@ private HoodieWriteConfig reloadWriteConfig() throws Exception {
public void setExecutor(NonThrownExecutor executor) {
this.executor = executor;
}

@Override
public void close() throws Exception {
if (null != this.executor) {
this.executor.close();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.asyncCompaction -> this.executor != null

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we can fix the ClusteringOperator#close as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, good idea

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

}
if (null != this.writeClient) {
this.writeClient.cleanHandlesGracefully();
this.writeClient.close();
this.writeClient = null;
}
}
}