mirror of
https://github.com/apache/druid.git
synced 2025-02-17 07:25:02 +00:00
only close exec if it exists (#9952)
This commit is contained in:
parent
e03d38b6c8
commit
c2c38f6ac2
@ -560,16 +560,18 @@ public class KinesisRecordSupplier implements RecordSupplier<String, String>
|
||||
|
||||
assign(ImmutableSet.of());
|
||||
|
||||
scheduledExec.shutdown();
|
||||
if (scheduledExec != null) {
|
||||
scheduledExec.shutdown();
|
||||
|
||||
try {
|
||||
if (!scheduledExec.awaitTermination(EXCEPTION_RETRY_DELAY_MS, TimeUnit.MILLISECONDS)) {
|
||||
scheduledExec.shutdownNow();
|
||||
try {
|
||||
if (!scheduledExec.awaitTermination(EXCEPTION_RETRY_DELAY_MS, TimeUnit.MILLISECONDS)) {
|
||||
scheduledExec.shutdownNow();
|
||||
}
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
log.warn(e, "InterruptedException while shutting down");
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
log.warn(e, "InterruptedException while shutting down");
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
this.closed = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user