Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Krishna Kondaka <[email protected]>
  • Loading branch information
Krishna Kondaka committed Jul 23, 2024
1 parent e6c07bc commit e1aa05d
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -591,23 +591,20 @@ private void closeFiles() {
if (restHighLevelClient != null) {
try {
restHighLevelClient.close();
restHighLevelClient = null;
} catch (final IOException e) {
throw new RuntimeException(e.getMessage(), e);
}
}
if (dlqWriter != null) {
try {
dlqWriter.close();
dlqWriter = null;
} catch (final IOException e) {
LOG.error(e.getMessage(), e);
}
}
if (dlqFileWriter != null) {
try {
dlqFileWriter.close();
dlqFileWriter = null;
} catch (final IOException e) {
LOG.error(e.getMessage(), e);
}
Expand All @@ -619,14 +616,6 @@ public void shutdown() {
super.shutdown();
closeFiles();
openSearchClient.shutdown();
// Explicitly set to null to make the GC faster.
// This is useful in cases of sink initialize retry
openSearchClient = null;
openSearchClientRefresher = null;
bulkRetryStrategy = null;
bulkApiWrapper = null;
bulkRequestSupplier = null;
initialized = false;
}

private void maybeUpdateServerlessNetworkPolicy() {
Expand Down

0 comments on commit e1aa05d

Please sign in to comment.