[ 
https://issues.apache.org/jira/browse/HDFS-17017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17724121#comment-17724121
 ] 

Viraj Jasani edited comment on HDFS-17017 at 5/19/23 5:25 AM:
--------------------------------------------------------------

anyways, in order to prevent "any new argument for any of the existing 
commands" from running into similar "exhausting max arguments" case, what can 
we do? can we write a test that can parse all possible arguments for the given 
command ("-report" in this case) and pass them all and ensure that the output 
return code/exit code still remains 0?

if we have such test, then whenever someone introduces a new argument in 
future, the test will automatically pass the argument to the command and the 
test would fail, forcing dev to handle the "max argument" case.


was (Author: vjasani):
anyways, in order to prevent any new argument for any of the existing commands 
to get into similar case of exhausting max arguments, what can we do? can we 
write a test that can parse all possible arguments for the given command 
("-report" in this case) and pass them all and ensure that the output return 
code/exit code still remains 0?

if we have such test, then whenever someone introduces a new argument in 
future, the test will automatically pass the argument to the command and the 
test would likely fail, forcing dev to handle the "max argument" case.

> Fix the issue of arguments number limit in report command in DFSAdmin.
> ----------------------------------------------------------------------
>
>                 Key: HDFS-17017
>                 URL: https://issues.apache.org/jira/browse/HDFS-17017
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Haiyang Hu
>            Assignee: Haiyang Hu
>            Priority: Major
>
> Currently, the DFSAdmin report command should support a maximum number of 
> arguments of 7, such as :
> hdfs dfsadmin [-report] [-live] [-dead] [-decommissioning] 
> [-enteringmaintenance] [-inmaintenance] [-slownodes]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to