Uploaded image for project: 'NiFi Registry'
  1. NiFi Registry
  2. NIFIREG-148

Add "export"/"import" REST end-points

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.1.0
    • Fix Version/s: None
    • Labels:
      None

      Description

      Currently if we want to do an export/import we can use the end-point to retrieve a version of a flow which gives us the JSON representation of a VersionedFlowSnapshot:

      buckets/<bid>/flows<fid>/versions/<v>

      This end-point was not made specifically for an export operation, so it returns metadata specific to the given registry, such as the flow and bucket info, and a self link.

      We should have end-points like:

      buckets/<bid>/flows<fid>/versions/<v>/export
      buckets/<bid>/flows<fid>/versions/latest/expor

      Which return a representation that is intended to be imported directly to another registry. The representation needs to consider the following:

      • Deterministic ordering - whatever the representation is, it must serialize in a deterministic order so that comparing two exported versions of a flow outside of the registry would let them be diff'd by standard tools. Jackson and JAX-B both have ways of controlling the order.
      • Representation - Currently the existing end-points all return JSON via Jackson serialization of the domain model, but the FlowPersistenceProvider uses JAX-B with an encoded version in a magic byte. So we need to decide if we should standardize on one representation in case a git-based FlowPersistenceProvider is implemented, we would possibly want exported flows to look the same as what is being stored in git.

      On the import side we can currently do an initial import via a two-step process where we first create a flow and then post the first version. We should be able to take an exported version and go right to an initial import in one step.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bbende Bryan Bende
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: