Skip to content

Differences Between Packaging IO Connectors and Functions in .jar vs .nar #22711

Answered by lhotari
NurramoX asked this question in Q&A
Discussion options

You must be logged in to vote

A nar file contains the dependent libraries in the file in META-INF/bundled-dependencies directory. Pulsar extracts the Nar file to a temporary directory using NarUnpacker and uses NarClassLoader to add all of the jar files in META-INF/bundled-dependencies to the classloader used to load a IO connector or function.

The alternative to a nar file would be to use a fat jar where all dependencies are combined in a single jar file.

The nar file doesn't provide classloader isolation from the parent classloader used in Pulsar. It's not possible to override a class that is available in the parent classloader when using Nar files. This could impact the behavior in some cases since there are multip…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@NurramoX
Comment options

Answer selected by NurramoX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants