From c9be1cb4e84f15724a3d881fccc80e3b2432c0d5 Mon Sep 17 00:00:00 2001 From: sensor Date: Fri, 15 Dec 2023 11:18:53 +0800 Subject: [PATCH] Clean useless InterruptedException warn in ingestion task log (#15519) * Clean useless InterruptedException warn in ingestion task log * test coverage for the code change, manually close the scheduler thread to trigger Interrupt signal --------- Co-authored-by: Qiong Chen --- .../java/org/apache/druid/emitter/kafka/KafkaEmitter.java | 4 ++++ .../java/org/apache/druid/emitter/kafka/KafkaEmitterTest.java | 2 ++ 2 files changed, 6 insertions(+) diff --git a/extensions-contrib/kafka-emitter/src/main/java/org/apache/druid/emitter/kafka/KafkaEmitter.java b/extensions-contrib/kafka-emitter/src/main/java/org/apache/druid/emitter/kafka/KafkaEmitter.java index 4a58464f7308..c776e3f2f8b2 100644 --- a/extensions-contrib/kafka-emitter/src/main/java/org/apache/druid/emitter/kafka/KafkaEmitter.java +++ b/extensions-contrib/kafka-emitter/src/main/java/org/apache/druid/emitter/kafka/KafkaEmitter.java @@ -181,6 +181,10 @@ private void sendToKafka(final String topic, MemoryBoundLinkedBlockingQueue setKafkaProducer() } countDownSentEvents.await(); + kafkaEmitter.close(); + Assert.assertEquals(0, kafkaEmitter.getMetricLostCount()); Assert.assertEquals(0, kafkaEmitter.getAlertLostCount()); Assert.assertEquals(0, kafkaEmitter.getSegmentMetadataLostCount());