This is an automated email from the ASF dual-hosted git repository.

sivabalan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new 8527590  [HUDI-1750] Fail to load user's class if user move 
hudi-spark-bundle jar into spark classpath (#2753)
8527590 is described below

commit 8527590772d05b58dcf7db460f743c6a43b78c1b
Author: li36909 <[email protected]>
AuthorDate: Wed Apr 7 10:33:32 2021 +0800

    [HUDI-1750] Fail to load user's class if user move hudi-spark-bundle jar 
into spark classpath (#2753)
---
 .../src/main/java/org/apache/hudi/common/util/ReflectionUtils.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/hudi-common/src/main/java/org/apache/hudi/common/util/ReflectionUtils.java 
b/hudi-common/src/main/java/org/apache/hudi/common/util/ReflectionUtils.java
index bb30b2a..22bec2e 100644
--- a/hudi-common/src/main/java/org/apache/hudi/common/util/ReflectionUtils.java
+++ b/hudi-common/src/main/java/org/apache/hudi/common/util/ReflectionUtils.java
@@ -50,7 +50,8 @@ public class ReflectionUtils {
   public static Class<?> getClass(String clazzName) {
     if (!clazzCache.containsKey(clazzName)) {
       try {
-        Class<?> clazz = Class.forName(clazzName);
+        Class<?> clazz = Class.forName(clazzName, true,
+                Thread.currentThread().getContextClassLoader());
         clazzCache.put(clazzName, clazz);
       } catch (ClassNotFoundException e) {
         throw new HoodieException("Unable to load class", e);

Reply via email to