You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by eo...@apache.org on 2022/06/21 11:37:51 UTC

[pulsar] branch master updated: [fix][broker] fix DEFAULT_NAR_EXTRACTION_DIR cause NoClassDefFoundError (#15979)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 771fd54391f [fix][broker] fix DEFAULT_NAR_EXTRACTION_DIR cause NoClassDefFoundError (#15979)
771fd54391f is described below

commit 771fd54391fcdfec861c4cfee1483228a9ffcc26
Author: lixinyang <84...@users.noreply.github.com>
AuthorDate: Tue Jun 21 19:37:39 2022 +0800

    [fix][broker] fix DEFAULT_NAR_EXTRACTION_DIR cause NoClassDefFoundError (#15979)
---
 .../src/main/java/org/apache/pulsar/common/nar/NarClassLoader.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/nar/NarClassLoader.java b/pulsar-common/src/main/java/org/apache/pulsar/common/nar/NarClassLoader.java
index 321cfe370a7..c4864883788 100644
--- a/pulsar-common/src/main/java/org/apache/pulsar/common/nar/NarClassLoader.java
+++ b/pulsar-common/src/main/java/org/apache/pulsar/common/nar/NarClassLoader.java
@@ -139,7 +139,8 @@ public class NarClassLoader extends URLClassLoader {
 
     private static final String TMP_DIR_PREFIX = "pulsar-nar";
 
-    public static final String DEFAULT_NAR_EXTRACTION_DIR = System.getProperty("java.io.tmpdir");
+    public static final String DEFAULT_NAR_EXTRACTION_DIR = System.getProperty("nar.extraction.tmpdir") != null
+            ? System.getProperty("nar.extraction.tmpdir") : System.getProperty("java.io.tmpdir");
 
     static NarClassLoader getFromArchive(File narPath, Set<String> additionalJars, ClassLoader parent,
                                                 String narExtractionDirectory)