-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HDFS-16445. Make HDFS count, mkdir, rm cross platform #3945
Merged
GauthamBanasandra
merged 15 commits into
apache:trunk
from
GauthamBanasandra:count-mkdir-rm-x-platform
Feb 2, 2022
Merged
HDFS-16445. Make HDFS count, mkdir, rm cross platform #3945
GauthamBanasandra
merged 15 commits into
apache:trunk
from
GauthamBanasandra:count-mkdir-rm-x-platform
Feb 2, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
goiri
approved these changes
Feb 1, 2022
HarshitGupta11
pushed a commit
to HarshitGupta11/hadoop
that referenced
this pull request
Nov 28, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of PR
The source files for
hdfs_count
,hdfs_mkdir
andhdfs_rm
usesgetopt
for parsing the command line arguments. getopt is available only on Linux and thus, isn't cross platform. We need to replace getopt withboost::program_options
to make these tools cross platform.How was this patch tested?
This PR was tested by running the above tools locally.
hdfs_mkdir
Ran the tool to create a directory.
The tool is then run with the
-p
option to exercise the creation of intermediate directories.The trailing
a/b/c
directories are created under the path/home/gautham
.The tool is then run with the
-m
option with700
as the mode. This turns all the permission bits on for user and turns off all the permission bits for group and other users.The trailing
d/e/f
directories are created under the path/home/gautham
with the permission of700
, even for the intermediate directories.Confirmation from browser.
hdfs_count
Ran the tool on one of the HDFS paths.
It shows the count of files and directories contained within this path.
The tool is then run with the quota option.
It displays the quota information additionally.
hdfs_rm
Ran the tool to delete a file.
The tool was then run with the
-R
option to recursively delete a directory and its sub-directories.The directory
a
and its sub-directories were deleted.Confirmation from browser.
![Delete directory](https://user-images.githubusercontent.com/10280768/151838226-86f1fb90-b3ab-46dd
![Browser](https://user-images.githubusercontent.com/10280768/151838314-c0fc7aac-6cf0-4270-a92d-d073dd322dfa.jpg)
-b8ab-28c8cfd19c76.jpg)
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?