[ 
https://issues.apache.org/jira/browse/FLINK-23237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17377059#comment-17377059
 ] 

hehuiyuan edited comment on FLINK-23237 at 7/8/21, 5:35 AM:
------------------------------------------------------------

Hi  [~Aiden Gong] , additionally, add log (debug or error) to print error data 
that failed to deserialize when set `ignore-parse-error` = `true`,  which is 
useful . Is it considered to do?

For example,

if the source has 1000 records, then the number of sink is 998. We can 
troubleshoot easily and find the error data from log.


was (Author: hehuiyuan):
[~Aiden Gong] , Additionally, add log (debug or error) to print error data that 
failed to deserialize when set `ignore-parse-error` = `true`,  which is useful .

Is it considered to do?

> Add log to print data that failed to deserialize when  
> ignore-parse-error=true 
> -------------------------------------------------------------------------------
>
>                 Key: FLINK-23237
>                 URL: https://issues.apache.org/jira/browse/FLINK-23237
>             Project: Flink
>          Issue Type: Improvement
>          Components: Formats (JSON, Avro, Parquet, ORC, SequenceFile)
>            Reporter: hehuiyuan
>            Priority: Minor
>
> Add log to print error data that failed to deserialize when set 
> `ignore-parse-error` = `true`
>  
> {code:java}
> public RowData deserialize(@Nullable byte[] message) throws IOException {
>     if (message == null) {
>         return null;
>     }
>     try {
>         final JsonNode root = objectReader.readValue(message);
>         return (RowData) runtimeConverter.convert(root);
>     } catch (Throwable t) {
>         if (ignoreParseErrors) {
>             return null;
>         }
>         throw new IOException(
>                 String.format("Failed to deserialize CSV row '%s'.", new 
> String(message)), t);
>     }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to