Mark Payne created NIFI-9754:
--------------------------------

             Summary: Introduce new class to nifi-api that provides the fields 
necessary from VersionedFlowSnapshot for NiFi's use
                 Key: NIFI-9754
                 URL: https://issues.apache.org/jira/browse/NIFI-9754
             Project: Apache NiFi
          Issue Type: Improvement
          Components: Core Framework, NiFi Stateless
            Reporter: Mark Payne
            Assignee: Mark Payne


The VersionedFlowSnapshot class provides several getters/setters for things 
like the flow contents, storage location, name, and version. NiFi makes use of 
many of these fields (but not all). Also, the Stateless Bootstrap requires that 
a VersionedFlowSnapshot be provided to create a Stateless flow.

However, the VersionedFlowSnapshot is located within the 
nifi-registry-data-model module, and not the nifi-api. Unfortunately, it cannot 
be brought over into the nifi-api module because it has a dependency on the 
jax-rs {{Link}} class, and perhaps other dependencies, that we cannot introduce 
into nifi-api.

However, we need a class in nifi-api that provides the same types of elements: 
the flow contents, parameter contexts, external controller services, and 
metadata.

This should be used for the Stateless Bootstrap instead of 
VersionedFlowSnapshot. Currently, the dependency on VersionedFlowSnapshot means 
that we must create the stateless engine's ClassLoader in such a way that it 
loads VersionedFlowSnapshot and other classes from the enclosing application's 
ClassLoader, which causes our Classloader isolation not to work properly for 
the stateless engine (though extensions still have proper classloader 
isolation). If we introduce a new class into nifi-api, we have the ability to 
provide better classloader isolation, since only the nifi-api jar and other 
jars on the nifi lib/ directory must be shared between the stateless engine and 
the caller.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to