-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-17213. RBF: In RouterAdmin class, "if else" is not as elegant as "switch case" in the admin command parameters section. #6134
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
d9b2853
to
649ebf8
Compare
💔 -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. |
💔 -1 overall
This message was automatically generated. |
… "switch case" in the admin command parameters section.
649ebf8
to
f6a4770
Compare
🎊 +1 overall
This message was automatically generated. |
@xiaojunxiang2023 Thank you for your contribution! But personally, I don't recommend making this change. It could potentially create some difficulties for backport code. For instance, some users might be using version 3.1, and if there are improvements in the CLI in the future, they would have to first locate this PR and then backport other PRs. The previous code also looks readable. |
@@ -1925,6 +1925,42 @@ public void testAddMultipleMountPointsFailure() throws Exception { | |||
err.toString().contains("Cannot add mount points: [/testAddMultiMountPoints-01")); | |||
} | |||
|
|||
@Test | |||
public void testGetUsage() throws Exception { |
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.
this test is pretty irrelevant in the context, you are checking the exit codes here, where you didn't even touch them, there should be an existing test I believe which tests the help output
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.
Indeed, thanks for pointing it out
https://issues.apache.org/jira/browse/HDFS-17213
sketch: Improve the getUseage( ) method: "if else" -> "switch case"