sijie commented on a change in pull request #5357: [functions][Issue:5350]Fix
pulsar can't load the customized SerDe
URL: https://github.com/apache/pulsar/pull/5357#discussion_r338459546
##########
File path:
pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/source/TopicSchema.java
##########
@@ -163,6 +168,43 @@ private static boolean isProtobufClass(Class<?>
pojoClazz) {
}
}
+ @SuppressWarnings("unchecked")
+ private <T> Schema<T> newSchemaInstance(String topic, Class<T> clazz,
String schemaTypeOrClassName, boolean input, ClassLoader classLoader) {
Review comment:
I don't think we should duplicate the code when adding `classLoader`. It
makes code maintenance become very hard. Can we try to avoid duplicating the
code here? Instead, can you just improve the method below to handle loading
using an additional class loader?
----------------------------------------------------------------
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