pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [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…
Date Wed, 19 Dec 2018 02:39:25 GMT
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_r242775410
 
 

 ##########
 File path: pulsar-flink/src/main/java/org/apache/flink/streaming/connectors/pulsar/serde/JsonRowDeserializationSchema.java
 ##########
 @@ -102,7 +117,13 @@ public Row deserialize(byte[] message) throws IOException {
 
             return row;
         } catch (Throwable t) {
-            throw new IOException("Failed to deserialize JSON object.", t);
+            if(ignoreJsonFormatError){
+                final int arity = typeInfo.getArity();
+                final Object[] nullsArray = new Object[arity];
+                return Row.of(nullsArray);
+            }else
+                throw new IOException("Failed to deserialize JSON object.", t);
+
 
 Review comment:
   ```suggestion
               }
   ```

----------------------------------------------------------------
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

Mime
View raw message