From 35147a620f2ae4e2164ba342e77976667837d5f3 Mon Sep 17 00:00:00 2001 From: Peter Wicks Date: Wed, 9 Jan 2019 13:03:46 -0700 Subject: [PATCH] NIFI-5940 Cluster Node Offload Hangs if any RPG on flow is Disabled This closes #3255 Signed-off-by: Mark Payne --- .../java/org/apache/nifi/controller/StandardFlowService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowService.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowService.java index 83d845c55e..ef5043921a 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowService.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowService.java @@ -710,7 +710,9 @@ public class StandardFlowService implements FlowService, ProtocolHandler { .forEach(pn -> pn.getProcessGroup().terminateProcessor(pn)); // request to stop all remote process groups - flowManager.getRootGroup().findAllRemoteProcessGroups().forEach(RemoteProcessGroup::stopTransmitting); + flowManager.getRootGroup().findAllRemoteProcessGroups() + .stream().filter(rpg -> rpg.isTransmitting()) + .forEach(RemoteProcessGroup::stopTransmitting); // offload all queues on node final Set connections = flowManager.findAllConnections();