jerrypeng opened a new pull request #4685: Use classloaders to load Java functions URL: https://github.com/apache/pulsar/pull/4685 Master Issue: #4277 ### Motivation Currently we use a heavily shaded JAR to run Java functions. There are some disadvantages to this approach 1. Every time a dependency is added (even for transitive dependencies), we need to remember to to shade it. 2. Take up extra space (especially relevant for docker images) since we are essentially duplicating classes in the java-instance shaded JAR 3. Does not achieve total use code isolation as users still cannot run functions that use pulsar-admin-client or pulsar-client ### Modifications Instead of using a shaded JAR to start a java function instance, use different classloaders to load the internal pulsar code, user code, and the interfaces that the two interacts with each other. key changes: 1. removed all shading from runtime-all module. Now it just produces a small java-instance jar that contains only the interfaces and logging dependencies. 2. Changed log4j files from yaml format to xml because using yaml format requires additional dependencies.
---------------------------------------------------------------- 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] With regards, Apache Git Services
