You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/06/10 09:22:14 UTC

[GitHub] [pulsar] eolivelli commented on a diff in pull request #15979: [fix][broker] fix DEFAULT_NAR_EXTRACTION_DIR cause NoClassDefFoundError

eolivelli commented on code in PR #15979:
URL: https://github.com/apache/pulsar/pull/15979#discussion_r894331214


##########
pulsar-common/src/main/java/org/apache/pulsar/common/nar/NarClassLoader.java:
##########
@@ -139,7 +139,7 @@ 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");

Review Comment:
   You have to fallback on the legacy name if this property is not configured 



##########
bin/pulsar:
##########
@@ -290,6 +290,9 @@ if [[ -z "$IS_JAVA_8" ]]; then
   OPTS="$OPTS --add-opens java.base/sun.net=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED"
 fi
 
+# Specify default nar tmp dir
+OPTS="$OPTS -Dnar.extraction.tmpdir=$PULSAR_HOME/tmp"

Review Comment:
   Please don't change this default behaviour, we are going to break existing users that upgrade.
   
   Now that you hBe the system property you can let your users configure it



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org