pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject [incubator-pulsar] branch master updated: Use Function class loader to resolve function types (#1699)
Date Tue, 01 May 2018 05:23:13 GMT
This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new fd576ae  Use Function class loader to resolve function types (#1699)
fd576ae is described below

commit fd576aea6ec221e9a729b05a19550a33d1864d03
Author: Sanjeev Kulkarni <sanjeevrk@gmail.com>
AuthorDate: Mon Apr 30 22:23:10 2018 -0700

    Use Function class loader to resolve function types (#1699)
---
 .../src/main/java/org/apache/pulsar/functions/source/PulsarSource.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/source/PulsarSource.java
b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/source/PulsarSource.java
index caaa7bf..9048544 100644
--- a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/source/PulsarSource.java
+++ b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/source/PulsarSource.java
@@ -128,7 +128,7 @@ public class PulsarSource<T> implements Source<T> {
 
     private void setupSerde() throws ClassNotFoundException {
 
-        Class<?> typeArg = Class.forName(this.pulsarConfig.getTypeClassName());
+        Class<?> typeArg = Thread.currentThread().getContextClassLoader().loadClass(this.pulsarConfig.getTypeClassName());
         if (Void.class.equals(typeArg)) {
             throw new RuntimeException("Input type of Pulsar Function cannot be Void");
         }

-- 
To stop receiving notification emails like this one, please contact
sijie@apache.org.

Mime
View raw message