[
https://issues.apache.org/jira/browse/NIFI-4789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16344012#comment-16344012
]
ASF GitHub Bot commented on NIFI-4789:
--------------------------------------
Github user charlesporter commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2411#discussion_r164561259
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ExtractGrok.java
---
@@ -142,10 +194,11 @@
.description("FlowFiles are routed to this relationship when
no provided Grok Expression matches the content of the FlowFile")
.build();
+
private final static List<PropertyDescriptor> descriptors;
private final static Set<Relationship> relationships;
- private volatile Grok grok = new Grok();
+ private volatile List<Grok> grokList = new ArrayList<>();
--- End diff --
ok, i will create a new list. In practice, it is never modified while
running multi-threaded. but it is an easy and computationally cheap fix for
safer code.
> Enhance ExtractGrok processor to handle multiple grok expressions
> -----------------------------------------------------------------
>
> Key: NIFI-4789
> URL: https://issues.apache.org/jira/browse/NIFI-4789
> Project: Apache NiFi
> Issue Type: New Feature
> Components: Core Framework
> Affects Versions: 1.2.0, 1.5.0
> Environment: all
> Reporter: Charles Porter
> Priority: Minor
> Labels: features
>
> Many flows require running several grok expressions against an input to
> correctly tag and extract data. using many separate grok processors to
> accomplish this is unwieldy and hard to maintain. Supporting multiple grok
> expressions delimited by comma or user selected delimiter greatly simplifies
> this.
> Feature is coded and tested, ready for pull request, if feature is approved
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)