huangzhaobo99 commented on code in PR #6379:
URL: https://github.com/apache/hadoop/pull/6379#discussion_r1435762664
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/ECAdmin.java:
##########
@@ -642,6 +642,10 @@ public int run(Configuration conf, List<String> args)
throws IOException {
throw e;
}
} else {
+ if (args.size() > 0) {
+ System.err.println(getName() + ": Too many arguments");
Review Comment:
1. It looks good!
However, if multiple EC policies are enabled in the cluster, use `bin/hdfs
ec -verifyClusterSetup` command is incorrect.
2. The reasons are as follows:
`DistributedFileSystem#getECTopologyResultForPolicies` can only return one
result (ECTopologyVerifierResult).
```java
/**
* Verifies if the given policies are supported in the given cluster setup.
* If not policy is specified checks for all enabled policies.
* @param policyNames name of policies.
* @return the result if the given policies are supported in the cluster
setup
* @throws IOException
*/
public ECTopologyVerifierResult getECTopologyResultForPolicies(
final String... policyNames) throws IOException {
return dfs.getECTopologyResultForPolicies(policyNames);
}
```
3. Modify to require specifying the `-policy` param? Or modify the return
value of `DistributedFileSystem#getECTopologyResultForPolicies`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]