Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlintStreamingJobCleanerTask missing event listener #2574

Merged
merged 1 commit into from
Mar 20, 2024
Merged
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 @@ -133,7 +133,18 @@
}
});
}
initializeStreamingJobHouseKeeperCron();

if (flintStreamingJobHouseKeeperCron == null) {
initializeStreamingJobHouseKeeperCron();
clusterService.addLifecycleListener(
new LifecycleListener() {

Check warning on line 140 in spark/src/main/java/org/opensearch/sql/spark/cluster/ClusterManagerEventListener.java

View check run for this annotation

Codecov / codecov/patch

spark/src/main/java/org/opensearch/sql/spark/cluster/ClusterManagerEventListener.java#L138-L140

Added lines #L138 - L140 were not covered by tests
@Override
public void beforeStop() {
cancel(flintStreamingJobHouseKeeperCron);
flintStreamingJobHouseKeeperCron = null;
}

Check warning on line 145 in spark/src/main/java/org/opensearch/sql/spark/cluster/ClusterManagerEventListener.java

View check run for this annotation

Codecov / codecov/patch

spark/src/main/java/org/opensearch/sql/spark/cluster/ClusterManagerEventListener.java#L143-L145

Added lines #L143 - L145 were not covered by tests
});
}
}

private void initializeStreamingJobHouseKeeperCron() {
Expand Down
Loading