mirror of https://github.com/apache/druid.git
Removed 'if' condition. (#8768)
This commit is contained in:
parent
aa81253cf4
commit
b8ceee4eee
|
@ -233,9 +233,7 @@ public class KafkaLookupExtractorFactory implements LookupExtractorFactory
|
||||||
}
|
}
|
||||||
catch (InterruptedException | ExecutionException | TimeoutException e) {
|
catch (InterruptedException | ExecutionException | TimeoutException e) {
|
||||||
executorService.shutdown();
|
executorService.shutdown();
|
||||||
if (!future.isDone() && !future.cancel(false)) {
|
future.cancel(true);
|
||||||
LOG.warn("Could not cancel kafka listening thread");
|
|
||||||
}
|
|
||||||
LOG.error(e, "Failed to start kafka extraction factory");
|
LOG.error(e, "Failed to start kafka extraction factory");
|
||||||
cacheHandler.close();
|
cacheHandler.close();
|
||||||
return false;
|
return false;
|
||||||
|
@ -259,10 +257,7 @@ public class KafkaLookupExtractorFactory implements LookupExtractorFactory
|
||||||
|
|
||||||
final ListenableFuture<?> future = this.future;
|
final ListenableFuture<?> future = this.future;
|
||||||
if (future != null) {
|
if (future != null) {
|
||||||
if (!future.isDone() && !future.cancel(false)) {
|
future.cancel(true);
|
||||||
LOG.error("Error cancelling future for topic [%s]", getKafkaTopic());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
cacheHandler.close();
|
cacheHandler.close();
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue