This is an automated email from the ASF dual-hosted git repository.

sarath pushed a commit to branch branch-0.8
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/branch-0.8 by this push:
     new 2b3275c  ATLAS-3459 - Fix JsonSyntaxException while processing Atlas 
hook message.
2b3275c is described below

commit 2b3275cd8eda5259129bf9961ab4c838e4140e65
Author: nixonrodrigues <[email protected]>
AuthorDate: Fri Oct 11 13:14:26 2019 +0530

    ATLAS-3459 - Fix JsonSyntaxException while processing Atlas hook message.
    
    Signed-off-by: Sarath Subramanian <[email protected]>
---
 .../src/main/java/org/apache/atlas/kafka/AtlasKafkaConsumer.java      | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/notification/src/main/java/org/apache/atlas/kafka/AtlasKafkaConsumer.java 
b/notification/src/main/java/org/apache/atlas/kafka/AtlasKafkaConsumer.java
index c15da15..af657b4 100644
--- a/notification/src/main/java/org/apache/atlas/kafka/AtlasKafkaConsumer.java
+++ b/notification/src/main/java/org/apache/atlas/kafka/AtlasKafkaConsumer.java
@@ -17,6 +17,7 @@
  */
 package org.apache.atlas.kafka;
 
+import com.google.gson.JsonSyntaxException;
 import org.apache.atlas.notification.AbstractNotificationConsumer;
 import org.apache.atlas.notification.MessageDeserializer;
 import org.slf4j.Logger;
@@ -76,6 +77,9 @@ public class AtlasKafkaConsumer<T> extends 
AbstractNotificationConsumer<T> {
                 } catch (OutOfMemoryError excp) {
                     LOG.error("Ignoring message that failed to deserialize: 
topic={}, partition={}, offset={}, key={}, value={}",
                               record.topic(), record.partition(), 
record.offset(), record.key(), record.value(), excp);
+                } catch (JsonSyntaxException jse) {
+                    LOG.error("Ignoring message that failed to deserialize: 
topic={}, partition={}, offset={}, key={}, value={}",
+                            record.topic(), record.partition(), 
record.offset(), record.key(), record.value(), jse);
                 }
 
                 if (message == null) {

Reply via email to