Repository: arrow Updated Branches: refs/heads/master c7db80e72 -> e70d97dbc
ARROW-358: Add explicit environment variable to locate libhdfs in one's environment Author: Wes McKinney <[email protected]> Closes #195 from wesm/ARROW-358 and squashes the following commits: c00d251 [Wes McKinney] Add explicit environment variable to locate libhdfs in one's environment Project: http://git-wip-us.apache.org/repos/asf/arrow/repo Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/e70d97db Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/e70d97db Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/e70d97db Branch: refs/heads/master Commit: e70d97dbc8dc86161083e94c45d5828f79211f6b Parents: c7db80e Author: Wes McKinney <[email protected]> Authored: Wed Nov 2 08:06:29 2016 +0100 Committer: Uwe L. Korn <[email protected]> Committed: Wed Nov 2 08:06:29 2016 +0100 ---------------------------------------------------------------------- cpp/src/arrow/io/libhdfs_shim.cc | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/arrow/blob/e70d97db/cpp/src/arrow/io/libhdfs_shim.cc ---------------------------------------------------------------------- diff --git a/cpp/src/arrow/io/libhdfs_shim.cc b/cpp/src/arrow/io/libhdfs_shim.cc index 07eb625..1fee595 100644 --- a/cpp/src/arrow/io/libhdfs_shim.cc +++ b/cpp/src/arrow/io/libhdfs_shim.cc @@ -386,6 +386,11 @@ static std::vector<fs::path> 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);
