atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nixon Rodrigues <>
Subject Re: Review Request 61274: ATLAS-1944 - Fix for ConcurrentModificationException Exception in HookConsumer (KafkaConsumer) while stopping Atlas server
Date Wed, 02 Aug 2017 08:48:33 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Aug. 2, 2017, 8:48 a.m.)

Review request for atlas, Apoorv Naik, Ashutosh Mestry, Madhan Neethiraj, and Sarath Subramanian.


This patch handles review comments from Apoorv and Ashutosh.

After adding extended HookConsumer from ShutdownableThread and calling consumer.shutdown(),
closing of kafkaconsumer was happening fine before timeout of consumer added back
the ShutdownableThread implementation in this patch.

Bugs: ATLAS-1944

Repository: atlas


Background:- NotificationHookConsumer was throwing ConcurrentModificationException exception
while shutting down the consumer thread. The stop method of thread was calling the kafkacosumer.stop
method while in run method of HookConsumer which is busy in cosuming the kafka message by
polling kafka server. This simaltanous action of stoping and polling causes ConcurrentModificationException.


* Added try finally block in run method which wraps the while loop and when loop ends the
finally blocks calls the consumer close method is called which ensures that close is called
after consuming is ended. 

* Replaced the ShutdownThread interface which was delaying the shutdown process of consumer
with Runnable interface used earlier.

Reference : -

Diffs (updated)

  notification/src/main/java/org/apache/atlas/kafka/ d431176 
  notification/src/main/java/org/apache/atlas/notification/ 0bd75e1

  webapp/src/main/java/org/apache/atlas/notification/ 51276d3




Tested the Atlas kafkaconsumer from hive hook and shutdown of atlas server to check if there
is issue while shutdown process.
Unit test and integration test are passing.


Nixon Rodrigues

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message