srilman commented on code in PR #35701: URL: https://github.com/apache/arrow/pull/35701#discussion_r1248938570
########## cpp/src/arrow/filesystem/azurefs.cc: ########## @@ -0,0 +1,159 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "arrow/filesystem/azurefs.h" + +#include "arrow/result.h" +#include "arrow/util/checked_cast.h" + +namespace arrow { +namespace fs { + +// ----------------------------------------------------------------------- +// AzureOptions Implementation + +AzureOptions::AzureOptions() {} + +bool AzureOptions::Equals(const AzureOptions& other) const { + return (scheme == other.scheme && account_dfs_url == other.account_dfs_url && + account_blob_url == other.account_blob_url && + credentials_kind == other.credentials_kind); +} + +// ----------------------------------------------------------------------- +// AzureFilesystem Implementation + +class AzureFileSystem::Impl : public std::enable_shared_from_this<AzureFileSystem::Impl> { + public: + io::IOContext io_context_; + std::string dfs_endpoint_url_; + std::string blob_endpoint_url_; + bool is_hierarchical_namespace_enabled_; + + explicit Impl(AzureOptions options, io::IOContext io_context) + : io_context_(io_context), options_(std::move(options)) {} + + Status Init() { + dfs_endpoint_url_ = options_.account_dfs_url; + blob_endpoint_url_ = options_.account_blob_url; + + if (options_.is_azurite) { + is_hierarchical_namespace_enabled_ = false; + } + return Status::OK(); + } + + const AzureOptions& options() const { return options_; } + + protected: Review Comment: Good point, removed the protected section and moved `AzureOptions options_` above -- 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]
