-
Notifications
You must be signed in to change notification settings - Fork 593
HDDS-3638. Add a cat command to show the text of a file in the Ozone server #954
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
adoroszlai
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.
Thanks @maobaolong for adding this command. It works fine. I have suggestion for a minor improvement in the description. In the future I think we might want to support catting multiple keys (similar to HDFS and Unix cat), but this is a good start.
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/keys/CatKeyHandler.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/keys/CatKeyHandler.java
Outdated
Show resolved
Hide resolved
xiaoyuyao
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.
LGTM overall, just some minor comments inline.
…/keys/CatKeyHandler.java Co-authored-by: Doroszlai, Attila <[email protected]>
|
@adoroszlai @xiaoyuyao Thanks for your review and help, i've addressed your comments, PTAL. |
adoroszlai
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.
Thanks @maobaolong for updating the patch. I only have a question regarding how @xiaoyuyao's comment was addressed.
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/keys/CatKeyHandler.java
Outdated
Show resolved
Hide resolved
|
@adoroszlai Thank you for the clarification, i use a const 4096 as chunk size, i think i have address @xiaoyuyao 's comments now, sorry for the misunderstand. |
adoroszlai
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.
LGTM. @xiaoyuyao please confirm the buffer size, and then I think this can be merged.
|
LGTM, +1 pending CI. |
What changes were proposed in this pull request?
When we deploy a hdfs cluster, our devops usually want to put a file into the cluster and cat the result to ensure anything is ok, so they want this command of ozone too.
Some time, we only want to print the content of the file in Ozone, we don't need to download it now.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-3638
How was this patch tested?