You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/12/19 02:39:25 UTC

[GitHub] sijie commented on a change in pull request #3210: when i use flink and pulsar ,i find that a Json format error will cause the flink program to not restart,so i fix thi…

sijie commented on a change in pull request #3210: when i use flink and pulsar ,i find that a Json format error will cause the flink program to not restart,so i fix thi…
URL: https://github.com/apache/pulsar/pull/3210#discussion_r242775321
 
 

 ##########
 File path: pulsar-flink/src/main/java/org/apache/flink/streaming/connectors/pulsar/serde/JsonRowDeserializationSchema.java
 ##########
 @@ -38,6 +38,21 @@
  */
 public class JsonRowDeserializationSchema implements DeserializationSchema<Row> {
 
+    /*
+        What to do when detecting that a json line cannot be deserialized :
+        (1).false : Throw A IOException and Terminate application。
+        (2).true  : Ignore the error line and add a null line。
+     */
+    private Boolean ignoreJsonFormatError = false;
 
 Review comment:
   nit: I would suggest using `boolean` rather than `Boolean` to avoid boxing and unboxing.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services