lhotari commented on pull request #9638: URL: https://github.com/apache/pulsar/pull/9638#issuecomment-791160397
> Why do we have to package all the connectors into one image even for users? I doubt a user will need to use all connectors Pulsar has to offer. Perhaps we can have a strategy in which a user can choose which connectors, he or she as actually needs and that gets baked into the image. And for users that just want to use pub sub, I think there is already an image that doesn't contain any connectors. I agree on this point. However, because of the existing user base of pulsar-all image, it would be a breaking change from the user's perspective if support for pulsar-all is suddenly stopped without a migration path. There is a lot of usage for pulsar-all image. For example, the pulsar-helm-chart uses the pulsar-all image in the default configuration: https://github.com/apache/pulsar-helm-chart/blob/67818a48cb41b3e4b6d685fb598332a9d9a320bb/charts/pulsar/values.yaml#L150-L172 > The thing is NARs are suppose to be self contained which means all the transitive dependencies of the connector needs to be packaged in it as well. NARs might supposed to be self contained, but the technical implementation doesn't support this. It seems that the Pulsar dependencies are in the parent classloader of the NAR classloader in all configurations of Pulsar Functions: thread, process and k8s runtime. **Because of this, any library that is part of Pulsar dependencies will get loaded from the parent classloader and not from the jar files embedded in the NAR file.** That is the reason why adding any classes that are part of Pulsar dependencies is unnecessary duplication in the Pulsar connector .nar files. This might not have been the original intention of the Pulsar Functions design. I'll spend some more time to verify with experimenting and testing whether it is the case or not. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
