pgyori commented on code in PR #10081:
URL: https://github.com/apache/nifi/pull/10081#discussion_r3691332453


##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-rules/src/main/java/org/apache/nifi/flowanalysis/rules/RequireLoadBalancedConnectionAfterPrimaryNodeSourceProcessor.java:
##########
@@ -0,0 +1,78 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.nifi.flowanalysis.rules;
+
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.flow.ConnectableComponentType;
+import org.apache.nifi.flow.VersionedProcessGroup;
+import org.apache.nifi.flow.VersionedProcessor;
+import org.apache.nifi.flowanalysis.AbstractFlowAnalysisRule;
+import org.apache.nifi.flowanalysis.FlowAnalysisRuleContext;
+import org.apache.nifi.flowanalysis.GroupAnalysisResult;
+import org.apache.nifi.scheduling.ExecutionNode;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+
+@Tags({"connection", "source", "load", "balance"})
+@CapabilityDescription("Produces rule violation when a source processor does 
not have a Load-Balanced Connection (LBC) downstream"

Review Comment:
   Can you please mention in the CapabilityDescription that it only applies to 
processors running on the Primary Node?



##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-rules/src/main/java/org/apache/nifi/flowanalysis/rules/RequireLoadBalancedConnectionAfterPrimaryNodeSourceProcessor.java:
##########
@@ -0,0 +1,78 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.nifi.flowanalysis.rules;
+
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.flow.ConnectableComponentType;
+import org.apache.nifi.flow.VersionedProcessGroup;
+import org.apache.nifi.flow.VersionedProcessor;
+import org.apache.nifi.flowanalysis.AbstractFlowAnalysisRule;
+import org.apache.nifi.flowanalysis.FlowAnalysisRuleContext;
+import org.apache.nifi.flowanalysis.GroupAnalysisResult;
+import org.apache.nifi.scheduling.ExecutionNode;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+
+@Tags({"connection", "source", "load", "balance"})
+@CapabilityDescription("Produces rule violation when a source processor does 
not have a Load-Balanced Connection (LBC) downstream"
+        + " in all outgoing connections")
+public class RequireLoadBalancedConnectionAfterPrimaryNodeSourceProcessor 
extends AbstractFlowAnalysisRule {
+
+
+    @Override
+    public Collection<GroupAnalysisResult> 
analyzeProcessGroup(VersionedProcessGroup processGroup, FlowAnalysisRuleContext 
context) {
+
+        Collection<GroupAnalysisResult> analysisResults = new HashSet<>();
+
+        Map<String, VersionedProcessor> sourceProcessors = new HashMap<>();
+        for (VersionedProcessor processor : processGroup.getProcessors()) {
+            if 
(ExecutionNode.PRIMARY.toString().equals(processor.getExecutionNode())) {
+                sourceProcessors.put(processor.getIdentifier(), processor);
+            }
+        }
+        // Remove all processors that are not source processors or not running
+        processGroup.getConnections().forEach(connection -> {
+            if (connection.getDestination().getType() == 
ConnectableComponentType.PROCESSOR) {
+                sourceProcessors.remove(connection.getDestination().getId());
+            }
+        });
+
+        processGroup.getConnections().forEach(connection -> {
+            if (connection.getSource().getId() != null) {
+                VersionedProcessor sourceProcessor = 
sourceProcessors.get(connection.getSource().getId());
+                if (sourceProcessor != null) {
+                    // Check if the connection is a Load-Balanced Connection
+                    if (Objects.equals(connection.getLoadBalanceStrategy(), 
"DO_NOT_LOAD_BALANCE")) {

Review Comment:
   To make sure a potential null load balance strategy does not go unnoticed, I 
recommend:
   `if (connection.getLoadBalanceStrategy() == null || 
"DO_NOT_LOAD_BALANCE".equals(connection.getLoadBalanceStrategy()))`



##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-rules/src/main/java/org/apache/nifi/flowanalysis/rules/RequireLoadBalancedConnectionAfterPrimaryNodeSourceProcessor.java:
##########
@@ -0,0 +1,78 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.nifi.flowanalysis.rules;
+
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.flow.ConnectableComponentType;
+import org.apache.nifi.flow.VersionedProcessGroup;
+import org.apache.nifi.flow.VersionedProcessor;
+import org.apache.nifi.flowanalysis.AbstractFlowAnalysisRule;
+import org.apache.nifi.flowanalysis.FlowAnalysisRuleContext;
+import org.apache.nifi.flowanalysis.GroupAnalysisResult;
+import org.apache.nifi.scheduling.ExecutionNode;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+
+@Tags({"connection", "source", "load", "balance"})
+@CapabilityDescription("Produces rule violation when a source processor does 
not have a Load-Balanced Connection (LBC) downstream"
+        + " in all outgoing connections")
+public class RequireLoadBalancedConnectionAfterPrimaryNodeSourceProcessor 
extends AbstractFlowAnalysisRule {
+
+
+    @Override
+    public Collection<GroupAnalysisResult> 
analyzeProcessGroup(VersionedProcessGroup processGroup, FlowAnalysisRuleContext 
context) {
+
+        Collection<GroupAnalysisResult> analysisResults = new HashSet<>();
+
+        Map<String, VersionedProcessor> sourceProcessors = new HashMap<>();
+        for (VersionedProcessor processor : processGroup.getProcessors()) {
+            if 
(ExecutionNode.PRIMARY.toString().equals(processor.getExecutionNode())) {
+                sourceProcessors.put(processor.getIdentifier(), processor);
+            }
+        }
+        // Remove all processors that are not source processors or not running
+        processGroup.getConnections().forEach(connection -> {
+            if (connection.getDestination().getType() == 
ConnectableComponentType.PROCESSOR) {
+                sourceProcessors.remove(connection.getDestination().getId());
+            }
+        });
+
+        processGroup.getConnections().forEach(connection -> {
+            if (connection.getSource().getId() != null) {
+                VersionedProcessor sourceProcessor = 
sourceProcessors.get(connection.getSource().getId());
+                if (sourceProcessor != null) {
+                    // Check if the connection is a Load-Balanced Connection
+                    if (Objects.equals(connection.getLoadBalanceStrategy(), 
"DO_NOT_LOAD_BALANCE")) {
+                        // If not, we need to report this as a violation
+                        analysisResults.add(
+                                
GroupAnalysisResult.forComponent(sourceProcessor,
+                                                connection.getIdentifier() + 
"_" + "LoadBalancedConnectionRequired",
+                                                "Source processors must 
configure their downstream connections to use a Load Balancing Strategy")

Review Comment:
   Could you please update this message to something like:
   "Source processors running on the Primary Node must configure ..."



##########
nifi-registry/nifi-registry-core/nifi-registry-docker/dockerhub/sh/update_flow_provider.sh:
##########


Review Comment:
   Although this change is absolutely necessary to make the script idempotent, 
I think it should be in its own commit, as I do not see how this is related to 
new flow analysis rule.



##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-rules/src/main/java/org/apache/nifi/flowanalysis/rules/RequireLoadBalancedConnectionAfterPrimaryNodeSourceProcessor.java:
##########
@@ -0,0 +1,78 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.nifi.flowanalysis.rules;
+
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.flow.ConnectableComponentType;
+import org.apache.nifi.flow.VersionedProcessGroup;
+import org.apache.nifi.flow.VersionedProcessor;
+import org.apache.nifi.flowanalysis.AbstractFlowAnalysisRule;
+import org.apache.nifi.flowanalysis.FlowAnalysisRuleContext;
+import org.apache.nifi.flowanalysis.GroupAnalysisResult;
+import org.apache.nifi.scheduling.ExecutionNode;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+
+@Tags({"connection", "source", "load", "balance"})
+@CapabilityDescription("Produces rule violation when a source processor does 
not have a Load-Balanced Connection (LBC) downstream"
+        + " in all outgoing connections")
+public class RequireLoadBalancedConnectionAfterPrimaryNodeSourceProcessor 
extends AbstractFlowAnalysisRule {
+
+
+    @Override
+    public Collection<GroupAnalysisResult> 
analyzeProcessGroup(VersionedProcessGroup processGroup, FlowAnalysisRuleContext 
context) {
+
+        Collection<GroupAnalysisResult> analysisResults = new HashSet<>();
+
+        Map<String, VersionedProcessor> sourceProcessors = new HashMap<>();
+        for (VersionedProcessor processor : processGroup.getProcessors()) {
+            if 
(ExecutionNode.PRIMARY.toString().equals(processor.getExecutionNode())) {
+                sourceProcessors.put(processor.getIdentifier(), processor);
+            }
+        }
+        // Remove all processors that are not source processors or not running
+        processGroup.getConnections().forEach(connection -> {
+            if (connection.getDestination().getType() == 
ConnectableComponentType.PROCESSOR) {
+                sourceProcessors.remove(connection.getDestination().getId());
+            }
+        });
+
+        processGroup.getConnections().forEach(connection -> {
+            if (connection.getSource().getId() != null) {
+                VersionedProcessor sourceProcessor = 
sourceProcessors.get(connection.getSource().getId());
+                if (sourceProcessor != null) {
+                    // Check if the connection is a Load-Balanced Connection
+                    if (Objects.equals(connection.getLoadBalanceStrategy(), 
"DO_NOT_LOAD_BALANCE")) {
+                        // If not, we need to report this as a violation
+                        analysisResults.add(
+                                
GroupAnalysisResult.forComponent(sourceProcessor,
+                                                connection.getIdentifier() + 
"_" + "LoadBalancedConnectionRequired",

Review Comment:
   Nitpicking: the "_" + "LoadBalancedConnectionRequired" could simply be 
"_LoadBalancedConnectionRequired"



##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-rules/src/main/java/org/apache/nifi/flowanalysis/rules/RequireLoadBalancedConnectionAfterPrimaryNodeSourceProcessor.java:
##########
@@ -0,0 +1,78 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.nifi.flowanalysis.rules;
+
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.flow.ConnectableComponentType;
+import org.apache.nifi.flow.VersionedProcessGroup;
+import org.apache.nifi.flow.VersionedProcessor;
+import org.apache.nifi.flowanalysis.AbstractFlowAnalysisRule;
+import org.apache.nifi.flowanalysis.FlowAnalysisRuleContext;
+import org.apache.nifi.flowanalysis.GroupAnalysisResult;
+import org.apache.nifi.scheduling.ExecutionNode;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+
+@Tags({"connection", "source", "load", "balance"})
+@CapabilityDescription("Produces rule violation when a source processor does 
not have a Load-Balanced Connection (LBC) downstream"
+        + " in all outgoing connections")
+public class RequireLoadBalancedConnectionAfterPrimaryNodeSourceProcessor 
extends AbstractFlowAnalysisRule {
+
+
+    @Override
+    public Collection<GroupAnalysisResult> 
analyzeProcessGroup(VersionedProcessGroup processGroup, FlowAnalysisRuleContext 
context) {
+
+        Collection<GroupAnalysisResult> analysisResults = new HashSet<>();
+
+        Map<String, VersionedProcessor> sourceProcessors = new HashMap<>();
+        for (VersionedProcessor processor : processGroup.getProcessors()) {
+            if 
(ExecutionNode.PRIMARY.toString().equals(processor.getExecutionNode())) {
+                sourceProcessors.put(processor.getIdentifier(), processor);
+            }
+        }
+        // Remove all processors that are not source processors or not running
+        processGroup.getConnections().forEach(connection -> {
+            if (connection.getDestination().getType() == 
ConnectableComponentType.PROCESSOR) {

Review Comment:
   To be safe, I recommend a null check:
   `if (connection.getDestination() != null && 
connection.getDestination().getType() == ConnectableComponentType.PROCESSOR)`



##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-rules/src/main/java/org/apache/nifi/flowanalysis/rules/RequireLoadBalancedConnectionAfterPrimaryNodeSourceProcessor.java:
##########
@@ -0,0 +1,78 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.nifi.flowanalysis.rules;
+
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.flow.ConnectableComponentType;
+import org.apache.nifi.flow.VersionedProcessGroup;
+import org.apache.nifi.flow.VersionedProcessor;
+import org.apache.nifi.flowanalysis.AbstractFlowAnalysisRule;
+import org.apache.nifi.flowanalysis.FlowAnalysisRuleContext;
+import org.apache.nifi.flowanalysis.GroupAnalysisResult;
+import org.apache.nifi.scheduling.ExecutionNode;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+
+@Tags({"connection", "source", "load", "balance"})
+@CapabilityDescription("Produces rule violation when a source processor does 
not have a Load-Balanced Connection (LBC) downstream"
+        + " in all outgoing connections")
+public class RequireLoadBalancedConnectionAfterPrimaryNodeSourceProcessor 
extends AbstractFlowAnalysisRule {
+
+
+    @Override
+    public Collection<GroupAnalysisResult> 
analyzeProcessGroup(VersionedProcessGroup processGroup, FlowAnalysisRuleContext 
context) {
+
+        Collection<GroupAnalysisResult> analysisResults = new HashSet<>();
+
+        Map<String, VersionedProcessor> sourceProcessors = new HashMap<>();
+        for (VersionedProcessor processor : processGroup.getProcessors()) {
+            if 
(ExecutionNode.PRIMARY.toString().equals(processor.getExecutionNode())) {
+                sourceProcessors.put(processor.getIdentifier(), processor);
+            }
+        }
+        // Remove all processors that are not source processors or not running
+        processGroup.getConnections().forEach(connection -> {
+            if (connection.getDestination().getType() == 
ConnectableComponentType.PROCESSOR) {
+                sourceProcessors.remove(connection.getDestination().getId());
+            }
+        });
+
+        processGroup.getConnections().forEach(connection -> {
+            if (connection.getSource().getId() != null) {

Review Comment:
   To be safe, I recommend a null check:
   `if (connection.getSource() != null && connection.getSource().getId() != 
null)`



##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-rules/src/main/java/org/apache/nifi/flowanalysis/rules/RequireLoadBalancedConnectionAfterPrimaryNodeSourceProcessor.java:
##########
@@ -0,0 +1,78 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.nifi.flowanalysis.rules;
+
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.flow.ConnectableComponentType;
+import org.apache.nifi.flow.VersionedProcessGroup;
+import org.apache.nifi.flow.VersionedProcessor;
+import org.apache.nifi.flowanalysis.AbstractFlowAnalysisRule;
+import org.apache.nifi.flowanalysis.FlowAnalysisRuleContext;
+import org.apache.nifi.flowanalysis.GroupAnalysisResult;
+import org.apache.nifi.scheduling.ExecutionNode;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+
+@Tags({"connection", "source", "load", "balance"})

Review Comment:
   I think it is worth adding something like "primary" or "primarynodeonly" to 
the tags.



##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-rules/src/main/java/org/apache/nifi/flowanalysis/rules/RequireLoadBalancedConnectionAfterPrimaryNodeSourceProcessor.java:
##########
@@ -0,0 +1,78 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.nifi.flowanalysis.rules;
+
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.flow.ConnectableComponentType;
+import org.apache.nifi.flow.VersionedProcessGroup;
+import org.apache.nifi.flow.VersionedProcessor;
+import org.apache.nifi.flowanalysis.AbstractFlowAnalysisRule;
+import org.apache.nifi.flowanalysis.FlowAnalysisRuleContext;
+import org.apache.nifi.flowanalysis.GroupAnalysisResult;
+import org.apache.nifi.scheduling.ExecutionNode;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+
+@Tags({"connection", "source", "load", "balance"})
+@CapabilityDescription("Produces rule violation when a source processor does 
not have a Load-Balanced Connection (LBC) downstream"
+        + " in all outgoing connections")
+public class RequireLoadBalancedConnectionAfterPrimaryNodeSourceProcessor 
extends AbstractFlowAnalysisRule {
+
+
+    @Override
+    public Collection<GroupAnalysisResult> 
analyzeProcessGroup(VersionedProcessGroup processGroup, FlowAnalysisRuleContext 
context) {
+
+        Collection<GroupAnalysisResult> analysisResults = new HashSet<>();
+
+        Map<String, VersionedProcessor> sourceProcessors = new HashMap<>();
+        for (VersionedProcessor processor : processGroup.getProcessors()) {
+            if 
(ExecutionNode.PRIMARY.toString().equals(processor.getExecutionNode())) {

Review Comment:
   Instead of .toString() I recommend using
   `ExecutionNode.PRIMARY.name()`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to