mirror of https://github.com/apache/druid.git
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 <qiong.chen@shopee.com>
This commit is contained in:
parent
9deeb288c5
commit
c9be1cb4e8
|
@ -181,6 +181,10 @@ public class KafkaEmitter implements Emitter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Throwable e) {
|
catch (Throwable e) {
|
||||||
|
if (e instanceof InterruptedException && e.getMessage() == null) {
|
||||||
|
log.info("Normal exit.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
log.warn(e, "Exception while getting record from queue or producer send, Events would not be emitted anymore.");
|
log.warn(e, "Exception while getting record from queue or producer send, Events would not be emitted anymore.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,6 +140,8 @@ public class KafkaEmitterTest
|
||||||
}
|
}
|
||||||
countDownSentEvents.await();
|
countDownSentEvents.await();
|
||||||
|
|
||||||
|
kafkaEmitter.close();
|
||||||
|
|
||||||
Assert.assertEquals(0, kafkaEmitter.getMetricLostCount());
|
Assert.assertEquals(0, kafkaEmitter.getMetricLostCount());
|
||||||
Assert.assertEquals(0, kafkaEmitter.getAlertLostCount());
|
Assert.assertEquals(0, kafkaEmitter.getAlertLostCount());
|
||||||
Assert.assertEquals(0, kafkaEmitter.getSegmentMetadataLostCount());
|
Assert.assertEquals(0, kafkaEmitter.getSegmentMetadataLostCount());
|
||||||
|
|
Loading…
Reference in New Issue