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


##########
be/src/util/jni-util.cpp:
##########
@@ -80,15 +112,21 @@ 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);
 
+    //LD_LIBRARY_PATH
+    std::string original_ld_library_path =
+            getenv("LD_LIBRARY_PATH") ? getenv("LD_LIBRARY_PATH") : "";
+    std::string new_ld_library_path =
+            fmt::format("{}/lib/hadoop_hdfs/native:{}", doris_home, 
original_ld_library_path);
+    setenv("LD_LIBRARY_PATH", new_ld_library_path.c_str(), 0);
+

Review Comment:
   It is not suitable to use the environment `LD_LIBRARY_PATH`. This 
environment is usually used for test. You would better to use 
`-Djava.library.path` like the original snippet.



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