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

shaofengshi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/master by this push:
     new fe8014e  KYLIN-3767 Print the malformed JSON data consumed from Kafka 
Topic
fe8014e is described below

commit fe8014e4643642668b57b1bf77465569f125734f
Author: Temple Zhou <dba...@gmail.com>
AuthorDate: Fri Jan 11 18:34:21 2019 +0800

    KYLIN-3767 Print the malformed JSON data consumed from Kafka Topic
---
 .../main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java  | 2 ++
 1 file changed, 2 insertions(+)

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 5aa60c9..affa6f3 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.ObjectMapper;
 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 final class TimedJsonStreamParser extends 
StreamingParser {
             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);
         }

Reply via email to