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

Joseph Witt commented on NIFI-2954:
-----------------------------------

Plan right now:

Refactor/move the StandardPropertyValidator class into nifi-utils module under 
a more appropriate package name.  Fix all references.  Change standard 
archetype reference to use nifi-utils instead of nifi-processor-utils by 
default.  nifi-utils will only depend on nifi-api and has a comment to say 
"don't add dependencies".

For processor developers staying in-line with the latest build line they'll 
need to update their reference to find the new StandardPropertyValidator 
location.  Same for the FlowFileFilter class.  But, existing instances and nars 
and all that will continue to work fine since these are not part of the public 
extension API and are pulled in by nars directly.  So impact will be very minor.

When processors do need the power of nifi-processor-utils then they'll also be 
pulling in nifi-security-utils which brings in bcprov/bcpkix by default.  As we 
go to the simpler nifi-utils we're also using nifi-utils instead of 
nifi-processor-utils which greatly reduces sizes of each nar that uses that by 
3MB.

This is a mild inconvenience for developers to adjust their module/package 
reference but greatly reduces build size and restores the intent and simplicity 
of the standard validators and indeed nifi-utils.

I analyzed a number of other approaches and all of them required far more 
intrusive refactoring and ultimately would not have had this degree of build 
size impact.

> Bouncycastle dependencies are duplicated throughout NARs
> --------------------------------------------------------
>
>                 Key: NIFI-2954
>                 URL: https://issues.apache.org/jira/browse/NIFI-2954
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Tools and Build
>    Affects Versions: 1.0.0
>            Reporter: Aldrin Piri
>            Assignee: Joseph Witt
>
> I was working with some of the NiFi dependencies for incorporation with/use 
> by MiNiFi and saw that several libraries were duplicated throughout all NARs.
> Of note were the bouncycastle dependencies which, together, are ~4MB in size.
> {code}
> # apiri @ computer in /usr/local/opt/nifi/libexec [17:20:23]
> $ find {lib,work} -type f -name '*bcprov-jdk15on*' | wc -l
>       54
> # apiri @ computer in /usr/local/opt/nifi/libexec [17:20:28]
> $ find {lib,work} -type f -name '*bcpkix*' | wc -l
>       53
> # apiri @ computer in /usr/local/opt/nifi/libexec [17:20:33]
> $ ls -lash 
> work/nar/framework/nifi-framework-nar-1.0.0.nar-unpacked/META-INF/bundled-dependencies/bcprov-jdk15on-1.54.jar
> 3.2M -rw-r--r-- 1 apiri admin 3.2M Oct  4 12:24 
> work/nar/framework/nifi-framework-nar-1.0.0.nar-unpacked/META-INF/bundled-dependencies/bcprov-jdk15on-1.54.jar
> # apiri @ computer in /usr/local/opt/nifi/libexec [17:20:39]
> $ ls -lash 
> work/nar/framework/nifi-framework-nar-1.0.0.nar-unpacked/META-INF/bundled-dependencies/bcpkix-jdk15on-1.54.jar
> 660K -rw-r--r-- 1 apiri admin 658K Oct  4 12:24 
> work/nar/framework/nifi-framework-nar-1.0.0.nar-unpacked/META-INF/bundled-dependencies/bcpkix-jdk15on-1.54.jar
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to