> On April 25, 2016, 6:10 p.m., Shwetha GS wrote: > > notification/src/main/java/org/apache/atlas/notification/VersionedMessageDeserializer.java, > > line 91 > > <https://reviews.apache.org/r/45720/diff/7/?file=1359680#file1359680line91> > > > > Lets take the case of one of the notification consumers, ranger. They > > will not override log4j.configuration to point to atlas-log4j.xml. They > > will have their own log4j.xml. And we can't force them to define the custom > > log appenders for entity notification in their log4j.xml. So, these log > > messages will use the default log appender and they need to go through this > > code to figure out the appender that this log statement uses. Instead, lets > > use the default class logger, in which case their log appender > > configuration for 'org.apache.atlas' package will work for these log > > statemnets as well. > > > > Its upto the consumers on how they want to handle incompatible > > versioned messages. Instead of logging to another file, we should use > > default logger(as explained above) and throw exception. Some consumers may > > want to fail even with 1 incompatible message, some may want to fail with n > > incompatible messages and others might log and ignore. Lets leave it upto > > the consumers > > > > In NotificationHookConsumer, because we are the consumer for hook > > messages in this case, we can catch IncompatibleVersionException, and log > > to another file and continue. > > Shwetha GS wrote: > Did you have plans of writing failed messages from > NotificationHookConsumer to a file so that it can be re-processed. Can be > done in another jira as well. Just checking
Maybe best to handle in another Jira. I don't think that it becomes an issue until we introduce a new version of the hook messages. Thanks. - Tom ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45720/#review130472 ----------------------------------------------------------- On April 26, 2016, 2:26 p.m., Tom Beerbower wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/45720/ > ----------------------------------------------------------- > > (Updated April 26, 2016, 2:26 p.m.) > > > Review request for atlas. > > > Bugs: ATLAS-631 > https://issues.apache.org/jira/browse/ATLAS-631 > > > Repository: atlas > > > Description > ------- > > 1. Introduce Versioning to Atlas Notification Payload (both ways) > 2. For any messages that are not able to be processed, log the message do a > separate log file for unprocessed messages. > > > Diffs > ----- > > notification/src/main/java/org/apache/atlas/kafka/KafkaConsumer.java > 029a072 > notification/src/main/java/org/apache/atlas/kafka/KafkaNotification.java > 889af11 > > notification/src/main/java/org/apache/atlas/notification/AbstractMessageDeserializer.java > PRE-CREATION > > notification/src/main/java/org/apache/atlas/notification/AbstractNotification.java > 596f988 > > notification/src/main/java/org/apache/atlas/notification/AbstractNotificationConsumer.java > 1cadb99 > > notification/src/main/java/org/apache/atlas/notification/IncompatibleVersionException.java > PRE-CREATION > > notification/src/main/java/org/apache/atlas/notification/MessageDeserializer.java > PRE-CREATION > > notification/src/main/java/org/apache/atlas/notification/MessageVersion.java > PRE-CREATION > > notification/src/main/java/org/apache/atlas/notification/NotificationInterface.java > ac285aa > > notification/src/main/java/org/apache/atlas/notification/VersionedMessage.java > PRE-CREATION > > notification/src/main/java/org/apache/atlas/notification/VersionedMessageDeserializer.java > PRE-CREATION > > notification/src/main/java/org/apache/atlas/notification/entity/EntityMessageDeserializer.java > PRE-CREATION > > notification/src/main/java/org/apache/atlas/notification/hook/HookMessageDeserializer.java > PRE-CREATION > notification/src/test/java/org/apache/atlas/kafka/KafkaConsumerTest.java > PRE-CREATION > > notification/src/test/java/org/apache/atlas/kafka/KafkaNotificationTest.java > db34815 > > notification/src/test/java/org/apache/atlas/notification/AbstractNotificationConsumerTest.java > PRE-CREATION > > notification/src/test/java/org/apache/atlas/notification/AbstractNotificationTest.java > PRE-CREATION > > notification/src/test/java/org/apache/atlas/notification/MessageVersionTest.java > PRE-CREATION > > notification/src/test/java/org/apache/atlas/notification/VersionedMessageTest.java > PRE-CREATION > > notification/src/test/java/org/apache/atlas/notification/entity/EntityMessageDeserializerTest.java > PRE-CREATION > > notification/src/test/java/org/apache/atlas/notification/entity/EntityNotificationImplTest.java > 385c41f > > notification/src/test/java/org/apache/atlas/notification/hook/HookMessageDeserializerTest.java > PRE-CREATION > > notification/src/test/java/org/apache/atlas/notification/hook/HookNotificationTest.java > 57b0eea > > Diff: https://reviews.apache.org/r/45720/diff/ > > > Testing > ------- > > New unit tests added. > > mvn clean test. > > > Thanks, > > Tom Beerbower > >