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

ASF GitHub Bot commented on NIFI-4136:
--------------------------------------

Github user bbende commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1955#discussion_r124821493
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/grok/GrokReader.java
 ---
    @@ -74,6 +74,8 @@
             "The line of text that does not match the Grok Expression will be 
appended to the last field of the prior message.");
         static final AllowableValue SKIP_LINE = new 
AllowableValue("skip-line", "Skip Line",
             "The line of text that does not match the Grok Expression will be 
skipped.");
    +    static final AllowableValue ROUTE_TO_FAILURE = new 
AllowableValue("route-to-failure", "Route to failure",
    --- End diff --
    
    Since it is up to the processor using the GrokReader to determine if 
something will be routed to failure, should we call this "Failure" or "Produce 
Error" or something indicating that reader is going to throw an exception? 


> GrokReader - Add a failure option to unmatch behavior options
> -------------------------------------------------------------
>
>                 Key: NIFI-4136
>                 URL: https://issues.apache.org/jira/browse/NIFI-4136
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: Pierre Villard
>            Assignee: Pierre Villard
>
> At the moment, when using the GrokReader, if a line does not match the grok 
> expression (and is not part of a stack trace), the line can be either ignored 
> (the line will be completely skipped) or  appended to the last field from the 
> previous line.
> In the case where appending is not desired and that data should not be 
> ignored/deleted, we should add the option to route the full flow file to the 
> failure relationship. This way the flow file could be treated in a different 
> way (for example with SplitText and ExtractGrok to isolate the incorrect 
> lines and re-route the correct lines back to the Record processors).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to