-
Hi everyone, I'm seeking some clarity on the differences between packaging IO connectors and functions in .jar or .nar formats within Pulsar. Specifically, I'm interested in
Thanks in advance for your insights! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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 multiple ways in Pulsar how Pulsar IO connectors or functions can be run. One possible way to workaround that is to use a shaded jar instead of a nar file where all dependencies are relocated to a different package. |
Beta Was this translation helpful? Give feedback.
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…