You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Matt Burgess (Jira)" <ji...@apache.org> on 2020/02/26 15:54:00 UTC

[jira] [Updated] (NIFI-6130) Add More information about exceptions from record readers/writers

     [ https://issues.apache.org/jira/browse/NIFI-6130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Burgess updated NIFI-6130:
-------------------------------
    Affects Version/s:     (was: 1.9.0)
               Status: Patch Available  (was: Open)

> Add More information about exceptions from record readers/writers
> -----------------------------------------------------------------
>
>                 Key: NIFI-6130
>                 URL: https://issues.apache.org/jira/browse/NIFI-6130
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Nimrod Avni
>            Assignee: HondaWei
>            Priority: Major
>         Attachments: image-2019-03-18-21-46-22-468.png, image-2019-03-18-21-47-16-888.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When using record readers and writers i ran into a problem where  i tried to give it a CSV with the same header twice, i.e something like
> ------------------------------------------
> header1,header2,header1
> a,b,c
> ------------------------------------------
>  (obviously not real data)
> When the reader tried to parse the flowfile as records it threw this error: "Failed to read Header line from CSV"
> Which is not very indicative, when i went ahead and debugged the source code i could see the real error is: 
> java.lang.IllegalArgumentException: The header contains a duplicate name: "header1" in [header1, header2, header1]
> (Pictures are provided)
> This is a case i ran into recently.
> I also have another case where tried to read an avro file which has a '#' (hashtag) character in one of the headers, which is illegal in the avro schema defenition.
> But the error i got there was : "failed to parse incoming data",
> And again, when i debugged the code i found the real error
> What the main point is to give a more indicative error message for record readers / writers, which not only gives the error itself but its cause
> I could probably look up many more reasons readers / writers could fail and they will not give a good error message, but i believe these 2 are fine as an example 



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