QiuMM commented on a change in pull request #6254: fix opentsdb emitter occupy 100%(#6247) URL: https://github.com/apache/incubator-druid/pull/6254#discussion_r213365894
########## File path: extensions-contrib/opentsdb-emitter/src/main/java/io/druid/emitter/opentsdb/OpentsdbSender.java ########## @@ -110,12 +119,15 @@ private void sendEvents() public void run() { while (running) { - if (!eventQueue.isEmpty()) { - OpentsdbEvent event = eventQueue.poll(); + try { + OpentsdbEvent event = eventQueue.take(); events.add(event); - if (events.size() >= flushThreshold) { - sendEvents(); - } + } + catch (InterruptedException e) { + log.error(e, "consumer take event failed!"); + } + if (events.size() >= flushThreshold) { + sendEvents(); Review comment: The while loop still always be running! Problem have not been solved. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org