[ https://issues.apache.org/jira/browse/HDFS-8853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14706542#comment-14706542 ]
Vinayakumar B commented on HDFS-8853: ------------------------------------- Thanks for the update [~andreina]. Few more nits. 1. {{+ boolean validPolicy = false;}}, can move this inside else block itself. 2. {code}+ throw new IllegalArgumentException("Policy [ " + ecPolicy.getName() + + " ] does not match any of the supported policies. " + + "Please select any one of " + ecPolicyNames); + }{code} Just replace this as below {code}+ throw new HadoopIllegalArgumentException("Policy '" + ecPolicy.getName() + + "' does not match any of the supported policies. " + + "Please select any one of " + ecPolicyNames); + }{code} Just to use, {{HadoopIllegalArgumentException}} and making message consistent with command line, "Policy {color:red}[{color} " + ecPolicy.getName() + " {color:red}]{color} " to "Policy {color:green}'{color}" + ecPolicy.getName() + "{color:green}'{color} ". > Erasure Coding: Provide ECSchema validation when creating ECZone > ---------------------------------------------------------------- > > Key: HDFS-8853 > URL: https://issues.apache.org/jira/browse/HDFS-8853 > Project: Hadoop HDFS > Issue Type: Sub-task > Reporter: Rakesh R > Assignee: J.Andreina > Attachments: HDFS-8853-HDFS-7285-01.patch, > HDFS-8853-HDFS-7285-merge-02.patch, HDFS-8853-HDFS-7285-merge-03.patch, > HDFS-8853-HDFS-7285-merge-04.patch > > > Presently the {{DFS#createErasureCodingZone(path, ecSchema, cellSize)}} > doesn't have any validation that the given {{ecSchema}} is available in > {{ErasureCodingSchemaManager#activeSchemas}} list. Now, if it doesn't exists > then will create the ECZone with {{null}} schema. IMHO we could improve this > by doing necessary basic sanity checks. -- This message was sent by Atlassian JIRA (v6.3.4#6332)