[ 
https://issues.apache.org/jira/browse/NIFIREG-7?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16133530#comment-16133530
 ] 

ASF GitHub Bot commented on NIFIREG-7:
--------------------------------------

GitHub user bbende opened a pull request:

    https://github.com/apache/nifi-registry/pull/5

    NIFIREG-7 Defining Provider API and initial filesystem providers

    This is a fairly large PR so let me give an overview of everything 
introduced here...
    
    This PR introduces the concept of a "Provider" which will be an extension 
point to allowable plug-able implementations of each provider. Initially there 
are two types of providers:
    
    - **MetadataProvider** - Responsible for tracking information about 
everything stored in the registry, such as what buckets there are, what objects 
are in those buckets, etc.
    - **FlowProvider** - Responsible for storing the contents of a versioned 
flow and all of its snapshots, this provider will be given the bytes of a 
snapshot and the metadata about it and will be responsible for persisting and 
retrieving those bytes
    
    Initially the registry will provide an implementation of each provider that 
uses the local filesystem for storage/persistence:
    
    - **FileSystemMetadataProvider** - Persists metadata to a configurable XML 
file using JAXB
    - **FileSystemFlowProvider** - Stores the bytes of a snapshot in a file, 
the general structure would be something like:
    ```
    storage_dir/
        bucket_id/
            flow_id/
                snapshot_id/
                    snapshot_id.flow 
    ```
    The providers are configured through a providers.xml configuration file in 
the registry conf directory, such as:
    
    ```
    <providers>
        <metadataProvider>
            
<class>org.apache.nifi.registry.metadata.FileSystemMetadataProvider</class>
            <property name="Metadata File">./metadata.xml</property>
        </metadataProvider>
        <flowProvider>
            <class>org.apache.nifi.registry.flow.FileSystemFlowProvider</class>
            <property name="Flow Storage Directory">./flow_storage</property>
        </flowProvider>
    </providers>
    ```
    Additional types of providers will likely be added as the scope of the 
registry expands to include other types of resources beyond just flows. There 
can be only one provider configured for each type of provider.
    
    The providers are obtained through the ProviderFactory, currently accessed 
in NiFiRegistryResourceConfig to inject the providers into the REST resources.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bbende/nifi-registry NIFIREG-7

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi-registry/pull/5.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #5
    
----
commit 4606d19f1fb388d9976c45611e72799f301bd4c7
Author: Bryan Bende <[email protected]>
Date:   2017-08-08T21:19:59Z

    NIFIREG-7 Defining Provider API and framework for loading providers
    - Renaming nifi-registry-flow-data-model to nifi-registry-data-model
    - Implementing FileSystemFlowProvider & FileSystemMetadataProvider
    - Adding unit tests for file system providers
    - Injecting providers into test REST resource

----


> Define Flow Persistence Provider Interface
> ------------------------------------------
>
>                 Key: NIFIREG-7
>                 URL: https://issues.apache.org/jira/browse/NIFIREG-7
>             Project: NiFi Registry
>          Issue Type: Improvement
>            Reporter: Bryan Bende
>            Assignee: Bryan Bende
>
> The Flow Persistence Provider will be the interface that the REST/service 
> layer uses to perform CRUD operations on versioned flows. The implementation 
> used by the application should be configurable.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to