adonis0147 commented on code in PR #27037:
URL: https://github.com/apache/doris/pull/27037#discussion_r1393882084


##########
be/src/util/jni-util.cpp:
##########
@@ -80,15 +94,17 @@ const std::string GetDorisJNIClasspathOption() {
     DCHECK(doris_home) << "Environment variable DORIS_HOME is not set.";
 
     // CLASSPATH
-    static const std::string classpath =
-            fmt::format("{}/conf:{}", doris_home, 
GetDorisJNIDefaultClasspath());
+    const std::string original_classpath = getenv("CLASSPATH") ? 
getenv("CLASSPATH") : "";
+    static const std::string classpath = fmt::format(
+            "{}/conf:{}:{}", doris_home, GetDorisJNIDefaultClasspath(), 
original_classpath);
     setenv("CLASSPATH", classpath.c_str(), 0);
 
     // LIBHDFS_OPTS
-    setenv("LIBHDFS_OPTS",
-           fmt::format("-Djava.library.path={}/lib/hadoop_hdfs/native", 
getenv("DORIS_HOME"))
-                   .c_str(),
-           0);
+    const std::string java_opts = getenv("JAVA_OPTS") ? getenv("JAVA_OPTS") : 
"";
+    std::string libhdfs_opts = fmt::format("{} 
-Djava.library.path={}/lib/hadoop_hdfs/native",

Review Comment:
   Should add the path `DORIS_HOME/lib` to `java.library.path` for `libz.so`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to