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

ASF subversion and git services commented on NIFI-10111:
--------------------------------------------------------

Commit 1442dcef233d627b1e34fee15c0d012005f749f2 in nifi's branch 
refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=1442dcef23 ]

NIFI-10111: Added option to unpack NARs into an Uber Jar and updated stateless 
nifi to always use this.

Signed-off-by: Matthew Burgess <[email protected]>

This closes #6117


> When unpacking NARs, provide ability to unpack into uber jar to avoid using 
> too many open file handles
> ------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-10111
>                 URL: https://issues.apache.org/jira/browse/NIFI-10111
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework, Documentation &amp; Website, NiFi 
> Stateless
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>            Priority: Major
>             Fix For: 1.17.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> When we unpack a NAR file, we expand all .jar files within it into the 
> working directory. We then create a NAR ClassLoader for the NAR. The NAR 
> ClassLoader extends URLClassLoader. As a result, we end up with a ClassLoader 
> that holds an open file handle for every JAR file (and potentially other 
> files) that gets unpacked.
> This can result in NiFi needing to use a lot of open file handles.
> When using Stateless NiFi, this is of particular concern, as it may need to 
> run in more constrained environments, since it's intended to be embedded.
> We can significantly reduce the number of open file handles by unpacking each 
> NAR into a single "Uber Jar File" instead of individual files. While this is 
> particularly of concern for for Stateless NiFi, it may provide benefits to 
> NiFi also. But for NiFi, it should not be "on by default". Users should have 
> to opt into it via an entry in nifi.properties.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to