Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion cpp/src/arrow/filesystem/hdfs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,14 @@ Result<HdfsOptions> HdfsOptions::FromUri(const Uri& uri) {
options_map.emplace(kv.first, kv.second);
}

// Special case host = "default" or "hdfs://default" as stated by GH-47560.
// If given the string "default", libhdfs selects the default filesystem
// from `core-site.xml`.
std::string host;
host = uri.scheme() + "://" + uri.host();
if (uri.host() == "default")
host = uri.host();
else
host = uri.scheme() + "://" + uri.host();

// configure endpoint
const auto port = uri.port();
Expand Down
Loading