rameeshm commented on code in PR #1231:
URL: https://github.com/apache/ranger/pull/1231#discussion_r4546815819


##########
audit-server/audit-dispatcher/dispatcher-common/src/main/java/org/apache/ranger/audit/dispatcher/kafka/AuditDispatcherBase.java:
##########
@@ -301,6 +355,44 @@ public void run() {
             }
         }
 
+        private boolean handlePollException(Exception e) {
+            if (e instanceof WakeupException) {
+                if (!running.get()) {
+                    LOG.info("WakeupException in {} dispatcher worker '{}' 
during shutdown", getDispatcherName(), workerId);
+                    return false;
+                }
+                LOG.error("WakeupException in {} dispatcher worker '{}'", 
getDispatcherName(), workerId, e);
+                return true;
+            } else if (e instanceof InterruptException) {
+                if (!running.get()) {
+                    LOG.info("InterruptException in {} dispatcher worker '{}' 
during shutdown", getDispatcherName(), workerId);
+                    return false;

Review Comment:
   @mneethiraj  Thanks for the review. I have addressed it by handling the 
interruption correctly.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to