[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800393#comment-17800393 ] huangzhaobo99 commented on HDFS-17056: -- [~ayushtkn] Thanks for your Merge. > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie, pull-request-available > Fix For: 3.4.0 > > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800339#comment-17800339 ] Ayush Saxena commented on HDFS-17056: - Committed to trunk. Thanx [~huangzhaobo99] for the contribution!!! > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie, pull-request-available > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800338#comment-17800338 ] ASF GitHub Bot commented on HDFS-17056: --- ayushtkn merged PR #6379: URL: https://github.com/apache/hadoop/pull/6379 > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie, pull-request-available > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800260#comment-17800260 ] ASF GitHub Bot commented on HDFS-17056: --- huangzhaobo99 commented on code in PR #6379: URL: https://github.com/apache/hadoop/pull/6379#discussion_r1435991712 ## 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 args) throws IOException { throw e; } } else { +if (args.size() > 0) { + System.err.println(getName() + ": Too many arguments"); Review Comment: @ayushtkn, That won't change for now. Thanks your guidance! > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie, pull-request-available > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800259#comment-17800259 ] ASF GitHub Bot commented on HDFS-17056: --- ayushtkn commented on code in PR #6379: URL: https://github.com/apache/hadoop/pull/6379#discussion_r1435987418 ## 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 args) throws IOException { throw e; } } else { +if (args.size() > 0) { + System.err.println(getName() + ": Too many arguments"); Review Comment: we can change but it won't be consistent with others https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/ECAdmin.java#L115-L117 https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/ECAdmin.java#L115-L117 https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/ECAdmin.java#L115-L117 > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie, pull-request-available > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800252#comment-17800252 ] ASF GitHub Bot commented on HDFS-17056: --- huangzhaobo99 commented on code in PR #6379: URL: https://github.com/apache/hadoop/pull/6379#discussion_r1435970897 ## 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 args) throws IOException { throw e; } } else { +if (args.size() > 0) { + System.err.println(getName() + ": Too many arguments"); Review Comment: Thx, @haiyang1987, No problem! Changing the error message: ```java System.err.println(getName() + ": Input invalid arguments.\nUsage: " + getLongUsage()); ``` How about it? cc @ayushtkn > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie, pull-request-available > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800238#comment-17800238 ] ASF GitHub Bot commented on HDFS-17056: --- haiyang1987 commented on code in PR #6379: URL: https://github.com/apache/hadoop/pull/6379#discussion_r1435938037 ## 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 args) throws IOException { throw e; } } else { +if (args.size() > 0) { + System.err.println(getName() + ": Too many arguments"); Review Comment: Agree with @ayushtkn , the current works as designed, if don't specify any policy the result is if validate all the enabled policies. maybe the current ticket only fix verifyClusterSetup an invalid param output ,thanks~ > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie, pull-request-available > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800236#comment-17800236 ] ASF GitHub Bot commented on HDFS-17056: --- huangzhaobo99 commented on code in PR #6379: URL: https://github.com/apache/hadoop/pull/6379#discussion_r1435934977 ## 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 args) throws IOException { throw e; } } else { +if (args.size() > 0) { + System.err.println(getName() + ": Too many arguments"); Review Comment: Thx, I understand. It is necessary to modify the protocol in order to support policy level validation. > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie, pull-request-available > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800235#comment-17800235 ] ASF GitHub Bot commented on HDFS-17056: --- ayushtkn commented on code in PR #6379: URL: https://github.com/apache/hadoop/pull/6379#discussion_r1435934137 ## 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 args) throws IOException { throw e; } } else { +if (args.size() > 0) { + System.err.println(getName() + ": Too many arguments"); Review Comment: If you pass multiple policies, that means you want a combined result, like if all these are supported or not in the "cluster", if you want one policy, pass one policy only. The whole design is to verify things at cluster level, not at policy level. To highlight cluster level setup issues, like all the enabled policies aren't supported & things like that, it was created for cluster admin level usage. you can add an additional option which tells the result per policy if the additional option is provided, in that case post getting the result, it can loop over the policies and get individual result, changing proto & all is like last things to do, but I don't think it is required as of now. > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie, pull-request-available > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800223#comment-17800223 ] ASF GitHub Bot commented on HDFS-17056: --- huangzhaobo99 commented on code in PR #6379: URL: https://github.com/apache/hadoop/pull/6379#discussion_r1435902418 ## 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 args) throws IOException { throw e; } } else { +if (args.size() > 0) { + System.err.println(getName() + ": Too many arguments"); Review Comment: @ayushtkn Thx for your Q, this is the design of the API itself. However, the combined message cannot clearly explain the reasons why per EC policy is not supported. > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie, pull-request-available > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800200#comment-17800200 ] ASF GitHub Bot commented on HDFS-17056: --- ayushtkn commented on code in PR #6379: URL: https://github.com/apache/hadoop/pull/6379#discussion_r1435864191 ## 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 args) throws IOException { throw e; } } else { +if (args.size() > 0) { + System.err.println(getName() + ": Too many arguments"); Review Comment: It works as designed, if you don't specify any policy the result is if all the policies enabled can work or not & the minimum number of datanodes required for each of them. It is validating cluster setup for the enabled policies, not per policy setup. if you specify multiple policies, it provides the aggregate result, like if all those policies can work on the cluster or not & if not a combined message like how man DN are required. like ``` 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, XOR-2-1-1024k. The number of DataNodes is only 3. ``` Like here, 9 is required number because of 6-3. If we intend to improve the behaviour we can think if there is a need > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie, pull-request-available > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800168#comment-17800168 ] ASF GitHub Bot commented on HDFS-17056: --- huangzhaobo99 commented on PR #6379: URL: https://github.com/apache/hadoop/pull/6379#issuecomment-1868495316 > May be necessary to modify the erasurecoding.proto file, `required` to `repeated`, similar to `DistributedFileSystem#addErasureCodingPolicies`. > > This modification will result in a many to many relationship. > > ```proto > // now > message GetECTopologyResultForPoliciesResponseProto { > required ECTopologyVerifierResultProto response = 1; > } > > // expect > message GetECTopologyResultForPoliciesResponseProto { > repeated ECTopologyVerifierResultProto response = 1; > } > ``` Hi @ayushtkn @haiyang1987, If you have time, let's discuss it together, Thanks. > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie, pull-request-available > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800165#comment-17800165 ] ASF GitHub Bot commented on HDFS-17056: --- huangzhaobo99 commented on PR #6379: URL: https://github.com/apache/hadoop/pull/6379#issuecomment-1868494355 May be necessary to modify the erasurecoding.proto file, `required` to `repeated`, similar to `DistributedFileSystem#addErasureCodingPolicies`. This modification will result in a many to many relationship. ```proto // now message GetECTopologyResultForPoliciesResponseProto { required ECTopologyVerifierResultProto response = 1; } // expect message GetECTopologyResultForPoliciesResponseProto { repeated ECTopologyVerifierResultProto response = 1; } ``` > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie, pull-request-available > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800135#comment-17800135 ] ASF GitHub Bot commented on HDFS-17056: --- 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 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`? > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie, pull-request-available > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800134#comment-17800134 ] ASF GitHub Bot commented on HDFS-17056: --- haiyang1987 commented on code in PR #6379: URL: https://github.com/apache/hadoop/pull/6379#discussion_r1435759118 ## 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 args) throws IOException { throw e; } } else { +if (args.size() > 0) { + System.err.println(getName() + ": Too many arguments"); Review Comment: `System.err.println(getName() + ": Input invalid arguments.\nUsage: " + getLongUsage());` How about it? > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie, pull-request-available > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800132#comment-17800132 ] ASF GitHub Bot commented on HDFS-17056: --- huangzhaobo99 commented on code in PR #6379: URL: https://github.com/apache/hadoop/pull/6379#discussion_r1435757632 ## 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 args) throws IOException { throw e; } } else { +if (args.size() > 0) { + System.err.println(getName() + ": Too many arguments"); Review Comment: The error message here is unfriendly, let me think about how to handle it. > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie, pull-request-available > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800108#comment-17800108 ] ASF GitHub Bot commented on HDFS-17056: --- hadoop-yetus commented on PR #6379: URL: https://github.com/apache/hadoop/pull/6379#issuecomment-1868369013 :broken_heart: **-1 overall** | Vote | Subsystem | Runtime | Logfile | Comment | |::|--:|:|::|:---:| | +0 :ok: | reexec | 0m 20s | | Docker mode activated. | _ Prechecks _ | | +1 :green_heart: | dupname | 0m 0s | | No case conflicting files found. | | +0 :ok: | codespell | 0m 0s | | codespell was not available. | | +0 :ok: | detsecrets | 0m 0s | | detect-secrets was not available. | | +1 :green_heart: | @author | 0m 0s | | The patch does not contain any @author tags. | | +1 :green_heart: | test4tests | 0m 0s | | The patch appears to include 1 new or modified test files. | _ trunk Compile Tests _ | | +1 :green_heart: | mvninstall | 31m 37s | | trunk passed | | +1 :green_heart: | compile | 0m 41s | | trunk passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04 | | +1 :green_heart: | compile | 0m 38s | | trunk passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08 | | +1 :green_heart: | checkstyle | 0m 37s | | trunk passed | | +1 :green_heart: | mvnsite | 0m 45s | | trunk passed | | +1 :green_heart: | javadoc | 0m 42s | | trunk passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04 | | +1 :green_heart: | javadoc | 1m 3s | | trunk passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08 | | +1 :green_heart: | spotbugs | 1m 47s | | trunk passed | | +1 :green_heart: | shadedclient | 20m 33s | | branch has no errors when building and testing our client artifacts. | _ Patch Compile Tests _ | | +1 :green_heart: | mvninstall | 0m 37s | | the patch passed | | +1 :green_heart: | compile | 0m 38s | | the patch passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04 | | +1 :green_heart: | javac | 0m 38s | | the patch passed | | +1 :green_heart: | compile | 0m 37s | | the patch passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08 | | +1 :green_heart: | javac | 0m 37s | | the patch passed | | +1 :green_heart: | blanks | 0m 0s | | The patch has no blanks issues. | | +1 :green_heart: | checkstyle | 0m 29s | | the patch passed | | +1 :green_heart: | mvnsite | 0m 39s | | the patch passed | | +1 :green_heart: | javadoc | 0m 29s | | the patch passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04 | | +1 :green_heart: | javadoc | 1m 0s | | the patch passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08 | | +1 :green_heart: | spotbugs | 1m 43s | | the patch passed | | +1 :green_heart: | shadedclient | 20m 28s | | patch has no errors when building and testing our client artifacts. | _ Other Tests _ | | -1 :x: | unit | 189m 27s | [/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6379/1/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt) | hadoop-hdfs in the patch passed. | | +1 :green_heart: | asflicense | 0m 28s | | The patch does not generate ASF License warnings. | | | | 276m 10s | | | | Reason | Tests | |---:|:--| | Failed junit tests | hadoop.hdfs.server.datanode.TestDirectoryScanner | | Subsystem | Report/Notes | |--:|:-| | Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6379/1/artifact/out/Dockerfile | | GITHUB PR | https://github.com/apache/hadoop/pull/6379 | | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets | | uname | Linux 8095edb8ef53 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | maven | | Personality | dev-support/bin/hadoop.sh | | git revision | trunk / 28d9261cee9ea7e679b3e23846ef54a4d47575b9 | | Default Java | Private Build-1.8.0_392-8u392-ga-1~20.04-b08 | | Multi-JDK versions | /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_392-8u392-ga-1~20.04-b08 | | Test Results | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6379/1/testReport/ | | Max. process+thread count | 4232 (vs. ulimit of 5500) | | modules | C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs | | Console output |
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param.
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800072#comment-17800072 ] ASF GitHub Bot commented on HDFS-17056: --- huangzhaobo99 opened a new pull request, #6379: URL: https://github.com/apache/hadoop/pull/6379 ### Description of PR JIRA: https://issues.apache.org/jira/browse/HDFS-17056 ### How was this patch tested? Add Unit Test. > EC: Fix verifyClusterSetup output in case of an invalid param. > -- > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Assignee: huangzhaobo99 >Priority: Major > Labels: newbie > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800040#comment-17800040 ] Ayush Saxena commented on HDFS-17056: - Go ahead, all yours!! > EC: Fix verifyClusterSetup output in case of an invalid param > - > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Priority: Major > Labels: newbie > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800039#comment-17800039 ] huangzhaobo99 commented on HDFS-17056: -- Hi [~ayushtkn] , Have you started working on this task yet? If not, do you mind if I assign it to myself. Let me learn and practice it. > EC: Fix verifyClusterSetup output in case of an invalid param > - > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Priority: Major > Labels: newbie > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-17056) EC: Fix verifyClusterSetup output in case of an invalid param
[ https://issues.apache.org/jira/browse/HDFS-17056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17736174#comment-17736174 ] Ayush Saxena commented on HDFS-17056: - Found while trying 3.3.6 RC, minor stuff should be present in trunk as well... A typical fix would be to add a simple if check like other commands in the verifyClusterOutput command, something like this & things should work {code:java} throw e; } } else { if (args.size() > 0) { System.err.println(getName() + ": Too many arguments"); return 1; } result = dfs.getECTopologyResultForPolicies(); {code} > EC: Fix verifyClusterSetup output in case of an invalid param > - > > Key: HDFS-17056 > URL: https://issues.apache.org/jira/browse/HDFS-17056 > Project: Hadoop HDFS > Issue Type: Bug > Components: ec >Reporter: Ayush Saxena >Priority: Major > > {code:java} > bin/hdfs ec -verifyClusterSetup XOR-2-1-1024k > 9 DataNodes are required for the erasure coding policies: RS-6-3-1024k, > XOR-2-1-1024k. The number of DataNodes is only 3. {code} > verifyClusterSetup requires -policy then the name of policies, else it > defaults to all enabled policies. > In case there are additional invalid options it silently ignores them, unlike > other EC commands which throws out Too Many Argument exception. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org