metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ottobackwards <...@git.apache.org>
Subject [GitHub] metron pull request #774: METRON-1212 The bundle system and maven plugin
Date Wed, 27 Sep 2017 11:12:13 GMT
GitHub user ottobackwards opened a pull request:

    https://github.com/apache/metron/pull/774

    METRON-1212 The bundle system and maven plugin 

    This PR contains the Bundle system and Maven Plugin.
    
    The bundle system and the plugin are adapted from the Apache Nifi project.  
    
    ## bundles-maven-plugin
    The bundles-maven-plugin is an adapted version of the jar dependency plugin who's function
is to bundle a jar of jars based on the dependencies for a project.  It also creates metadata
attributes.
    A project's jar, and it's non-provided dependency jars are place in a /lib entry in the
bundle, with the bundle itself being in jar format.
    
    ## bundles-lib 
    The bundles-lib contains the functionality required to:
    - discover bundles
    - inspect bundles for exposed extension types
    - load the bundles
    - create special class loaders for bundles
    - deliver instances of extension types for use
    
    NAR exposed the bundles through many classes.  I have created the BundleSystem interface
to expose a more usable, simplified api for our use cases.
    
    ### From the original PR for METRON-777:
    Metron Bundle Plugin
    - adaptation of the nifi plugin
    - more configurable wrt file extension/dependency and metadata naming
    bundle-lib
    - adaptation of nifi-nar-utils to be used outside of the nifi project
    - rudimentary extensibility to allow configuration and injection of service types and
other things that were hard coded to nifi
    - refactored from File based to VFS based
    - rebranding to Bundle from Nar ( although the lib and the plugin allow that to be configured
now )
    - added capability to the properties class to write to stream, adapted to uri from paths
    - added integration tests for hdfs
    - changed to be ClassIndex based instead of ServiceLoader. Service loader is slower, and
Casey's ClassIndex work is great. This also removes the NAR's required manual maintenance
of the service file.
    - refactored to use VFS to load the bundle/nar into the classloader AND to use VFS to
load the dependency jars -> VFS as a composite filesystem. Thus going from NAR's 'working
directory', exploded NARS to just loading the bundle/nar.
    
    ## Previous Review
    Please see [@mattf_apache's review](https://github.com/apache/metron/pull/530/files/c5f8c34e4de8e6d456b97edd6f8a0d33b4819d69)
    
    ## changes from that review
    In preparing this PR I have:
    - made checkstyle fixes
    - fixed several types
    - added a requested set of tests loading and executing simple interface/implementation
from bundle beyond what is already in the bundle-lib tests
    
    ## Testing
    This review is code review and test code review and running only
    
    ### For all changes:
    - [x] Is there a JIRA ticket associated with this PR? If not one needs to be created at
[Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).

    - [x] Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are
trying to resolve? Pay particular attention to the hyphen "-" character.
    - [x] Has your PR been rebased against the latest commit within the target branch (typically
master)?
    - [x] Have you ensured that the full suite of tests and checks have been executed in the
root metron \
    - [x] Have you written or updated unit tests and or integration tests to verify your changes?
    ### For documentation related changes:
    - [x] Have you ensured that format looks appropriate for the output in which it is rendered
by building and verifying the site-book? 

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

    $ git pull https://github.com/ottobackwards/metron fifth_bundles

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

    https://github.com/apache/metron/pull/774.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 #774
    
----
commit 8aa3372c506b065849a4d868d1fd920733d0396d
Author: Otto Fowler <ottobackwards@gmail.com>
Date:   2017-09-27T10:29:42Z

    The bundle=lib and maven plugin for bundles.
    as compared to the feature branch the differences are:
    - Added some modules to test loading a bundle, and executing a function
    - checkstyle changes
    - some minor typo fixes

----


---

Mime
View raw message