Remove the unwanted dependencies in the pulsar function's instance jar and...
Remove the unwanted dependencies in the pulsar function's instance jar and make SchemaInfo an interface (#10878) ### Motivation The java-instance.jar generated by the pulsar-functions-runtime-all module should only contain interfaces that Pulsar Function's framework uses to interact with user code. The module should on have the following dependencies 1. pulsar-io-core 2. pulsar-functions-api 3. pulsar-client-api 4. slf4j-api 5. log4j-slf4j-impl 6. log4j-api 7. log4j-core *Explain here the context, and why you're making that change. What is the problem you're trying to solve.* ### Modifications Change dep pulsar-client-original to pulsar-client-api Slight changes in the top level pom for what is included in all sub-modules so that additional deps don't land into java-instance.jar There is also a fix for an issue introduced by https://github.com/apache/pulsar/pull/9673. The thread context class loader was set incorrectly in ThreadRuntime. ### Future improvements 1. We should also add a test in the future to make sure external libraries don't get add accidentally this module and java-instance.jar 2. Rename the module "pulsar-functions-runtime-all" to something that describes its function better. The current name can be confusing (cherry picked from commit d81b5f8b)
Showing
- distribution/server/pom.xml 6 additions, 0 deletionsdistribution/server/pom.xml
- pom.xml 4 additions, 5 deletionspom.xml
- pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java 1 addition, 1 deletion...main/java/org/apache/pulsar/broker/service/ServerCnx.java
- pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiSchemaValidationEnforced.java 19 additions, 15 deletions...pulsar/broker/admin/AdminApiSchemaValidationEnforced.java
- pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/JsonSchemaCompatibilityCheckTest.java 7 additions, 5 deletions...oker/service/schema/JsonSchemaCompatibilityCheckTest.java
- pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java 3 additions, 2 deletions...er/src/test/java/org/apache/pulsar/schema/SchemaTest.java
- pulsar-broker/src/test/java/org/apache/pulsar/schema/compatibility/SchemaCompatibilityCheckTest.java 2 additions, 1 deletion...ar/schema/compatibility/SchemaCompatibilityCheckTest.java
- pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/SchemasImpl.java 9 additions, 6 deletions.../org/apache/pulsar/client/admin/internal/SchemasImpl.java
- pulsar-client-api/src/main/java/org/apache/pulsar/common/schema/SchemaInfo.java 6 additions, 46 deletions...main/java/org/apache/pulsar/common/schema/SchemaInfo.java
- pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java 1 addition, 1 deletion...rc/main/java/org/apache/pulsar/client/impl/ClientCnx.java
- pulsar-client/src/main/java/org/apache/pulsar/client/impl/HttpLookupService.java 1 addition, 1 deletion...java/org/apache/pulsar/client/impl/HttpLookupService.java
- pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/AutoProduceBytesSchema.java 4 additions, 3 deletions...che/pulsar/client/impl/schema/AutoProduceBytesSchema.java
- pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/BooleanSchema.java 1 addition, 1 deletion...a/org/apache/pulsar/client/impl/schema/BooleanSchema.java
- pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufSchema.java 1 addition, 1 deletion...a/org/apache/pulsar/client/impl/schema/ByteBufSchema.java
- pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufferSchema.java 1 addition, 1 deletion...rg/apache/pulsar/client/impl/schema/ByteBufferSchema.java
- pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/ByteSchema.java 1 addition, 1 deletion...java/org/apache/pulsar/client/impl/schema/ByteSchema.java
- pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/BytesSchema.java 1 addition, 1 deletion...ava/org/apache/pulsar/client/impl/schema/BytesSchema.java
- pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/DateSchema.java 1 addition, 1 deletion...java/org/apache/pulsar/client/impl/schema/DateSchema.java
- pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/DoubleSchema.java 1 addition, 1 deletion...va/org/apache/pulsar/client/impl/schema/DoubleSchema.java
- pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/FloatSchema.java 1 addition, 1 deletion...ava/org/apache/pulsar/client/impl/schema/FloatSchema.java
Please register or sign in to comment