shaofengshi closed pull request #428: KYLIN-3767 Print the malformed JSON data 
consumed from Kafka Topic
URL: https://github.com/apache/kylin/pull/428
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java
 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java
index 5aa60c9179..affa6f37ea 100644
--- 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java
+++ 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java
@@ -43,6 +43,7 @@
 import com.fasterxml.jackson.databind.type.MapType;
 import com.fasterxml.jackson.databind.type.SimpleType;
 import com.google.common.collect.Lists;
+import com.google.common.base.Charsets;
 
 /**
  * An utility class which parses a JSON streaming message to a list of strings 
(represent a row in table).
@@ -128,6 +129,7 @@ public TimedJsonStreamParser(List<TblColRef> allColumns, 
Map<String, String> pro
             messageRowList.add(streamingMessageRow);
             return messageRowList;
         } catch (IOException e) {
+            logger.error("malformed data: {}", new String(buffer.array(), 
Charsets.UTF_8));
             logger.error("error", e);
             throw new RuntimeException(e);
         }


 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to