[
https://issues.apache.org/jira/browse/HDFS-6796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benoy Antony updated HDFS-6796:
-------------------------------
Attachment: HDFS-6796.patch
The patch modifies the check to so that each iteration checks if there are at
least two more arguments.
For options which require 3 arguments (example: -include -f filename),
additional checks are added.
The patch modifies {code}TestBalancer.testBalancerCliParseWithWrongParams{code}
to test more conditions.
The patch modifies one of the test inputs to its intended value -
{code}
- parameters = new String[] { "-threshold 1 -policy" };
+ parameters = new String[] {"-threshold", "1", "-policy"};
{code]
> Improving the argument check during balancer command line parsing
> -----------------------------------------------------------------
>
> Key: HDFS-6796
> URL: https://issues.apache.org/jira/browse/HDFS-6796
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: balancer
> Affects Versions: 2.4.1
> Reporter: Benoy Antony
> Assignee: Benoy Antony
> Attachments: HDFS-6796.patch
>
>
> Currently balancer CLI parser simply checks if the total number of arguments
> is greater than 2 inside the loop. Since the check does not include any loop
> variables, it is not a proper check when there more than 2 arguments.
--
This message was sent by Atlassian JIRA
(v6.2#6252)