[ https://issues.apache.org/jira/browse/HDFS-8853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14706296#comment-14706296 ]
Vinayakumar B commented on HDFS-8853: ------------------------------------- bq. In the long term, it might be better for the client to pass a String to NN instead of the actual policy/schema. [~zhz], I think this could go as a separate Jira, as this involves changing the protocol, changes might be more for this. [~andreina], thanks for the patch. Looks overall good. Few comments, 1. Vaildation should happen only for the user passed policy, not for the system default policy. 2. {{ErasureCodingPolicy[] activePolicies = dir.getFSNamesystem().getErasureCodingPolicies();}}, instead of this, use {{FSDirErasureCodingOp.getErasureCodingPolicies(..);}} directly. Just to avoid one more lock, as already lock will be held. > 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 > > > 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)