NIFI-366: removed logic to check for invalid ports and throw exception if all ports are invalid. Instead, we will now just run but will be unable to transfer any data; this is preferred anyone because we should still allow the state to be set to transmit, so that when the ports are no longer invalid we can start transmitting immediately.
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/e370d7d7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/e370d7d7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/e370d7d7 Branch: refs/heads/NIFI-360 Commit: e370d7d7e3a78acdda5f7a3bc6d3c0a87768f7fa Parents: d8954ab Author: Mark Payne <marka...@hotmail.com> Authored: Tue Feb 24 14:03:00 2015 -0500 Committer: Mark Payne <marka...@hotmail.com> Committed: Tue Feb 24 14:03:00 2015 -0500 ---------------------------------------------------------------------- .../nifi/remote/StandardRemoteProcessGroup.java | 44 -------------------- 1 file changed, 44 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e370d7d7/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/remote/StandardRemoteProcessGroup.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/remote/StandardRemoteProcessGroup.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/remote/StandardRemoteProcessGroup.java index 6b70fe6..55575c6 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/remote/StandardRemoteProcessGroup.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/remote/StandardRemoteProcessGroup.java @@ -915,50 +915,6 @@ public class StandardRemoteProcessGroup implements RemoteProcessGroup { try { verifyCanStartTransmitting(); - // Check if any port is invalid - boolean invalidPort = false; - for (final Port port : getInputPorts()) { - if (!port.isValid()) { - invalidPort = true; - break; - } - } - - if (!invalidPort) { - for (final Port port : getOutputPorts()) { - if (!port.isValid()) { - invalidPort = true; - } - } - } - - // if any port is invalid, refresh contents to check if it is still invalid - boolean allPortsInvalid = invalidPort; - if (invalidPort) { - try { - refreshFlowContents(); - } catch (final CommunicationsException e) { - logger.warn("{} Attempted to refresh Flow Contents because at least one port is invalid but failed due to {}", this, e); - } - - for (final Port port : getInputPorts()) { - if (port.isValid()) { - allPortsInvalid = false; - break; - } - } - for (final Port port : getOutputPorts()) { - if (port.isValid()) { - allPortsInvalid = false; - break; - } - } - } - - if (allPortsInvalid) { - throw new IllegalStateException("Cannot Enable Transmission because all Input Ports & Output Ports to this Remote Process Group are in invalid states"); - } - for (final Port port : getInputPorts()) { // if port is not valid, don't start it because it will never become valid. // Validation is based on connections and whether or not the remote target exists.