You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "felipecrv (via GitHub)" <gi...@apache.org> on 2023/12/19 13:16:11 UTC
[PR] GH-39292 [C++][FS]: Remove the AzureBackend enum and add more flexible connection options [arrow]
felipecrv opened a new pull request, #39293:
URL: https://github.com/apache/arrow/pull/39293
### Rationale for this change
It's good to avoid mentioning the specific test environment in the implementation code.
### What changes are included in this PR?
- Removal of the enum
- Removal of the `AzureOptions::backend` class member
- Addition of more options to `AzureOptions`
- Removal of some private string members of `AzureOptions` -- the URLs are built on-the-fly when the clients are instantiated now
### Are these changes tested?
Yes.
### Are there any user-facing changes?
Changes to the public interface (`azurefs.h`) that won't affect users because the `AzureFS` implementation is not used yet.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39292 [C++][FS]: Remove the AzureBackend enum and add more flexible connection options [arrow]
Posted by "felipecrv (via GitHub)" <gi...@apache.org>.
felipecrv commented on PR #39293:
URL: https://github.com/apache/arrow/pull/39293#issuecomment-1862809908
Unrelated failures on macOS and appveyor builds.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39292 [C++][FS]: Remove the AzureBackend enum and add more flexible connection options [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #39293:
URL: https://github.com/apache/arrow/pull/39293#discussion_r1431906541
##########
cpp/src/arrow/filesystem/azurefs.cc:
##########
@@ -72,42 +74,59 @@ bool AzureOptions::Equals(const AzureOptions& other) const {
return false;
}
-void AzureOptions::SetUrlsForAccountName(const std::string& account_name) {
- if (this->backend == AzureBackend::kAzurite) {
- account_blob_url_ = "http://127.0.0.1:10000/" + account_name + "/";
- account_dfs_url_ = "http://127.0.0.1:10000/" + account_name + "/";
- } else {
- account_dfs_url_ = "https://" + account_name + ".dfs.core.windows.net/";
- account_blob_url_ = "https://" + account_name + ".blob.core.windows.net/";
+namespace {
+std::string BuildBaseUrl(const std::string& scheme, const std::string& authority,
+ const std::string& account_name) {
+ std::string url;
+ url += scheme + "://";
+ if (!authority.empty()) {
Review Comment:
I think that we should reject empty authority because it builds no host part URL.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39292 [C++][FS]: Remove the AzureBackend enum and add more flexible connection options [arrow]
Posted by "felipecrv (via GitHub)" <gi...@apache.org>.
felipecrv merged PR #39293:
URL: https://github.com/apache/arrow/pull/39293
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39292 [C++][FS]: Remove the AzureBackend enum and add more flexible connection options [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #39293:
URL: https://github.com/apache/arrow/pull/39293#issuecomment-1862741792
:warning: GitHub issue #39292 **has been automatically assigned in GitHub** to PR creator.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39292 [C++][FS]: Remove the AzureBackend enum and add more flexible connection options [arrow]
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #39293:
URL: https://github.com/apache/arrow/pull/39293#issuecomment-1863962113
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 56991d3efd57e610f5ab604086e19753bd8c834b.
There were no benchmark performance regressions. 🎉
The [full Conbench report](https://github.com/apache/arrow/runs/19813887327) has more details. It also includes information about 2 possible false positives for unstable benchmarks that are known to sometimes produce them.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39292 [C++][FS]: Remove the AzureBackend enum and add more flexible connection options [arrow]
Posted by "felipecrv (via GitHub)" <gi...@apache.org>.
felipecrv commented on code in PR #39293:
URL: https://github.com/apache/arrow/pull/39293#discussion_r1431974861
##########
cpp/src/arrow/filesystem/azurefs.cc:
##########
@@ -72,42 +74,59 @@ bool AzureOptions::Equals(const AzureOptions& other) const {
return false;
}
-void AzureOptions::SetUrlsForAccountName(const std::string& account_name) {
- if (this->backend == AzureBackend::kAzurite) {
- account_blob_url_ = "http://127.0.0.1:10000/" + account_name + "/";
- account_dfs_url_ = "http://127.0.0.1:10000/" + account_name + "/";
- } else {
- account_dfs_url_ = "https://" + account_name + ".dfs.core.windows.net/";
- account_blob_url_ = "https://" + account_name + ".blob.core.windows.net/";
+namespace {
+std::string BuildBaseUrl(const std::string& scheme, const std::string& authority,
+ const std::string& account_name) {
+ std::string url;
+ url += scheme + "://";
+ if (!authority.empty()) {
Review Comment:
My reasoning here is that there are many validations I could apply, but the most complete validation will come from the error messages triggered by using the filesystem with a bogus URL with 3 slashes after `https:`.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39292 [C++][FS]: Remove the AzureBackend enum and add more flexible connection options [arrow]
Posted by "felipecrv (via GitHub)" <gi...@apache.org>.
felipecrv commented on PR #39293:
URL: https://github.com/apache/arrow/pull/39293#issuecomment-1862741448
@Tom-Newton @kou
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org