From c00d2517999fdc4440bbd8e42f12c765c844ab4a Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Tue, 1 Nov 2016 18:23:33 -0400 Subject: [PATCH] Add explicit environment variable to locate libhdfs in one's environment Change-Id: I29bdaaa24e57f29ab96bb33fcb8476735de077f0 --- cpp/src/arrow/io/libhdfs_shim.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpp/src/arrow/io/libhdfs_shim.cc b/cpp/src/arrow/io/libhdfs_shim.cc index 07eb6250bbe..1fee595d071 100644 --- a/cpp/src/arrow/io/libhdfs_shim.cc +++ b/cpp/src/arrow/io/libhdfs_shim.cc @@ -386,6 +386,11 @@ static std::vector get_potential_libhdfs_paths() { search_paths.push_back(path); } + const char* libhdfs_dir = std::getenv("ARROW_LIBHDFS_DIR"); + if (libhdfs_dir != nullptr) { + search_paths.push_back(fs::path(libhdfs_dir)); + } + // All paths with file name for (auto& path : search_paths) { libhdfs_potential_paths.push_back(path / file_name);