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

    https://github.com/apache/nifi/pull/2397#discussion_r161131729
  
    --- Diff: 
nifi-nar-bundles/nifi-extension-utils/nifi-reporting-utils/src/main/java/org/apache/nifi/reporting/util/provenance/ProvenanceEventConsumer.java
 ---
    @@ -235,6 +251,32 @@ private boolean isFilteringEnabled() {
     
                 for (ProvenanceEventRecord provenanceEventRecord : 
provenanceEvents) {
                     final String componentId = 
provenanceEventRecord.getComponentId();
    +                if (!componentIdsExclude.isEmpty()) {
    +                    if (componentIdsExclude.contains(componentId)) {
    +                        continue;
    +                    }
    +                    // If we aren't excluding it based on component ID, 
let's see if this component has a parent process group IDs
    +                    // that is being excluded
    +                    if (componentMapHolder == null) {
    +                        continue;
    +                    }
    +                    final String processGroupId = 
componentMapHolder.getProcessGroupId(componentId, 
provenanceEventRecord.getComponentType());
    +                    if (StringUtils.isEmpty(processGroupId)) {
    +                        continue;
    --- End diff --
    
    Do we want to skip events if processGroupId is not found for one? We 
probably better to apply the exclude rule if a processGroupId is known, 
different from inclusion rules. Unknown should NOT be filtered out by exclusion 
rules IMO.


---

Reply via email to