-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-14917: [C++] Implement GcsFileSystem::CreateDir #11842
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
Conversation
This PR implements `GcsFileSystem::CreateDir`. I also reviewed the documentation for the class, since now the implementation of the class, particularly how directories are emulated, is more than just notes and ideas.
|
The failure on |
pitrou
left a comment
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.
Thank you very much. A couple questions and suggestions below.
cpp/src/arrow/filesystem/gcsfs.h
Outdated
| /// directory. | ||
| /// - The class creates marker objects for a directory, using a trailing slash in the | ||
| /// marker names. For debugging purposes, the metadata and contents of these marker | ||
| /// objects indicate that they are markers created by this class. The class does |
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.
Isn't there any de facto standard for directory metadata markers?
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.
Kind of? The UI in for Google Cloud creates empty objects ending with /. The command-line utility does no such thing (e.g. gsutil cp -r deep-directory/ gs://my-bucket/foo would not create these markers). The client libraries do not create them either. Whether that amounts to a de facto standard, I cannot say.
Frankly the use of "folder emulation" causes more harm than good. It creates the impression that some things should work (e.g. directory renames, directory permissions, efficient non-recursive listing) when they don't. And the markers are sort of useless. If you want to list objects non-recursively, the API has native support for including any matching prefixes in the results, without the need for these markers 🤷
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.
Hmm, sorry, my question was about the custom metadata you added to these markers.
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.
Ahhhhh. No, the UI does not create any metadata, but ignores it too. I think the metadata is harmless and useful for debugging.
|
Please take another look. |
|
Benchmark runs are scheduled for baseline = 77722d9 and contender = 01186fc. 01186fc is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
|
Benchmark runs are scheduled for baseline = 77722d9 and contender = 01186fc. 01186fc is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
This PR implements
GcsFileSystem::CreateDir. I also reviewed thedocumentation for the class, since now the implementation of the class,
particularly how directories are emulated, is more than just notes and
ideas.