-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-39069: [C++][FS][Azure] Use the generic filesystem tests #40567
Conversation
|
We need to fix some methods: https://github.com/apache/arrow/actions/runs/8292331910/job/22693446087?pr=40567#step:6:6004
|
I've changed the current implementation to pass the generic filesystem tests but it's still dirty... |
cpp/src/arrow/filesystem/azurefs.cc
Outdated
if (!recursive) { | ||
if (recursive) { | ||
std::vector<AzureLocation> target_locations; | ||
// Recursive CreateDir calls require there is no file in parents. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clearer wording:
// Recursive CreateDir calls require that all path segments be either a directory or not found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Applied!
cpp/src/arrow/filesystem/azurefs.cc
Outdated
if (info.type() == FileType::NotFound) { | ||
target_locations.push_back(parent); | ||
} | ||
parent = parent.parent(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A better name for the parent
variable is prefix
because a "prefix" can be the entire location whereas starting with parent = location;
is very weird because of the choice of variable name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I've changed it to prefix
.
return ExceptionToStatus(exception, "Failed to create directory '", | ||
location.all, "': ", container_client.GetUrl()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the first iteration of this loop, an exception shouldn't report a failure of the entire operation: the full path creates all the prefixes (they are "implied directories"). All the other functions handle implied directories, so it should be OK to rely on them.
// - Whether the filesystem allows moving a file | ||
virtual bool allow_move_file() const { return true; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a way to run these generic tests against the real Azure Data Lake environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added support for running with AzureFlatNSEnv
and AzureHierarchicalNSEnv
.
We've implemented file metadata for Azure Filesystem.
78e5a1a
to
d4dd4f1
Compare
The generic filesystem tests are passed with Azurite but failed with hierarchical name space enabled Azure account:
Can we work on this as a separated task? |
@felipecrv Do you want to review again before we merge this? |
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 9e320d7. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 7 possible false positives for unstable benchmarks that are known to sometimes produce them. |
Sorry for the delay in responding. No, this is fine. Thank you! |
…ache#40567) ### Rationale for this change We should provide common spec for all filesystem API. ### What changes are included in this PR? Enable the generic filesystem tests. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#39069 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
…ache#40567) ### Rationale for this change We should provide common spec for all filesystem API. ### What changes are included in this PR? Enable the generic filesystem tests. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#39069 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
…ache#40567) ### Rationale for this change We should provide common spec for all filesystem API. ### What changes are included in this PR? Enable the generic filesystem tests. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#39069 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
…ache#40567) ### Rationale for this change We should provide common spec for all filesystem API. ### What changes are included in this PR? Enable the generic filesystem tests. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#39069 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
…ache#40567) ### Rationale for this change We should provide common spec for all filesystem API. ### What changes are included in this PR? Enable the generic filesystem tests. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#39069 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
Rationale for this change
We should provide common spec for all filesystem API.
What changes are included in this PR?
Enable the generic filesystem tests.
Are these changes tested?
Yes.
Are there any user-facing changes?
No.