Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-9754

Introduce new class to nifi-api that provides the fields necessary from VersionedFlowSnapshot for NiFi's use

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.16.0
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              markap14 Mark Payne
              markap14 Mark Payne
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m