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

yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new 595beb61723 branch-4.0: [fix](Hdfs) Guard HDFS init when Java support 
disabled #60368 (#60433)
595beb61723 is described below

commit 595beb61723ea1f32663804ac7b9b175ad3d1e0a
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Feb 3 10:46:13 2026 +0800

    branch-4.0: [fix](Hdfs) Guard HDFS init when Java support disabled #60368 
(#60433)
    
    Cherry-picked from #60368
    
    Co-authored-by: Socrates <[email protected]>
---
 be/src/io/fs/hdfs/hdfs_mgr.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/be/src/io/fs/hdfs/hdfs_mgr.cpp b/be/src/io/fs/hdfs/hdfs_mgr.cpp
index e9b4315507c..73228a35622 100644
--- a/be/src/io/fs/hdfs/hdfs_mgr.cpp
+++ b/be/src/io/fs/hdfs/hdfs_mgr.cpp
@@ -23,6 +23,7 @@
 #include <chrono>
 #include <thread>
 
+#include "common/config.h"
 #include "common/kerberos/kerberos_ticket_mgr.h"
 #include "common/logging.h"
 #include "io/fs/err_utils.h"
@@ -126,6 +127,13 @@ void HdfsMgr::_cleanup_loop() {
 
 Status HdfsMgr::get_or_create_fs(const THdfsParams& hdfs_params, const 
std::string& fs_name,
                                  std::shared_ptr<HdfsHandler>* fs_handler) {
+#ifdef USE_HADOOP_HDFS
+    if (!config::enable_java_support) {
+        return Status::InvalidArgument(
+                "hdfs file system is not enabled, you can change be config 
enable_java_support to "
+                "true.");
+    }
+#endif
     uint64_t hash_code = _hdfs_hash_code(hdfs_params, fs_name);
 
     // First check without lock


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

Reply via email to