[
https://issues.apache.org/jira/browse/NIFI-3380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15930334#comment-15930334
]
ASF GitHub Bot commented on NIFI-3380:
--------------------------------------
Github user markap14 commented on the issue:
https://github.com/apache/nifi/pull/1585
@bbende I created a 3-node cluster. I added MyProcessor v2.0 to the flow. I
then shut down node 3, removed the nifi-example-processors-nar-2.0.nar file
from the lib/ directory and removed conf/flow.xml.gz. I then restarted Node 3.
It fails to startup because the cluster flow cannot be inherited, due to the
node not having v2.0 of the Processor. This, I think, is the expected behavior.
However, it fails with the following error message in the logs:
```
2017-03-17 13:14:58,602 ERROR [main]
o.a.nifi.controller.StandardFlowService Failed to load flow from cluster due
to: org.apache.nifi.controller.UninheritableFlowException: Failed to connect
node to cluster because local flow is different than cluster flow.
org.apache.nifi.controller.UninheritableFlowException: Failed to connect
node to cluster because local flow is different than cluster flow.
at
org.apache.nifi.controller.StandardFlowService.loadFromConnectionResponse(StandardFlowService.java:921)
~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
at
org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:513)
~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:780)
[nifi-jetty-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
at org.apache.nifi.NiFi.<init>(NiFi.java:162)
[nifi-runtime-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
at org.apache.nifi.NiFi.main(NiFi.java:269)
[nifi-runtime-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
Caused by: org.apache.nifi.controller.UninheritableFlowException:
org.apache.nifi.processors.example.MyProcessor from
org.apache.nifi:nifi-example-processors-nar:2.0 is not known to this NiFi
instance.
at
org.apache.nifi.controller.StandardFlowSynchronizer.checkBundleCompatibility(StandardFlowSynchronizer.java:431)
~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
at
org.apache.nifi.controller.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:246)
~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
at
org.apache.nifi.controller.FlowController.synchronize(FlowController.java:1535)
~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
at
org.apache.nifi.persistence.StandardXMLFlowConfigurationDAO.load(StandardXMLFlowConfigurationDAO.java:83)
~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
at
org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:707)
~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
at
org.apache.nifi.controller.StandardFlowService.loadFromConnectionResponse(StandardFlowService.java:896)
~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
... 4 common frames omitted
Caused by: java.lang.IllegalStateException:
org.apache.nifi.processors.example.MyProcessor from
org.apache.nifi:nifi-example-processors-nar:2.0 is not known to this NiFi
instance.
at
org.apache.nifi.util.BundleUtils.findCompatibleBundle(BundleUtils.java:54)
~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
at org.apache.nifi.util.BundleUtils.getBundle(BundleUtils.java:88)
~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
at
org.apache.nifi.controller.StandardFlowSynchronizer.checkBundleCompatibility(StandardFlowSynchronizer.java:429)
~[nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
... 9 common frames omitted
```
I find this error message confusing. It used to make sense when the local
flow as different than the cluster flow and that was the only way we could get
into this situation. However, it now is caused by failing to create the
necessary Processor. We should use a different error message.
Either we could throw a different Exception (perhaps something that extends
UninheritableFlowException?) and provide a different error message, or we
should make the message more generic, such as: "Unable to update local flow to
match the cluster's flow" instead of "Local flow is different from cluster
flow," given that the local flow was empty and therefore should try to inherit
the cluster flow.
Does that make sense?
> Multiple Versions of the Same Component
> ---------------------------------------
>
> Key: NIFI-3380
> URL: https://issues.apache.org/jira/browse/NIFI-3380
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework
> Reporter: Bryan Bende
> Assignee: Bryan Bende
> Fix For: 1.2.0
>
> Attachments: nifi-example-processors-nar-1.0.nar,
> nifi-example-processors-nar-2.0.nar, nifi-example-service-api-nar-1.0.nar,
> nifi-example-service-api-nar-2.0.nar, nifi-example-service-nar-1.0.nar,
> nifi-example-service-nar-1.1.nar, nifi-example-service-nar-2.0.nar
>
>
> This ticket is to track the work for supporting multiple versions of the same
> component within NiFi. The overall design for this feature is described in
> detail at the following wiki page:
> https://cwiki.apache.org/confluence/display/NIFI/Multiple+Versions+of+the+Same+Extension
> This ticket will track only the core NiFi work, and a separate ticket will be
> created to track enhancements for the NAR Maven Plugin.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)