[ 
https://issues.apache.org/jira/browse/HDFS-12399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16183098#comment-16183098
 ] 

Hanisha Koneru commented on HDFS-12399:
---------------------------------------

Thanks for the patch, [~Sammi].
A few comments:
- The intent is that enable policy should definitely fail for prohibited 
policies, right? If so, then the code block below would not assert that an 
exception is thrown while enabling a prohibited policy. This only checks the 
exception message, if at all an exception is thrown.
{code}
      // PROHIBITED policy cannot be enabled or disabled
      try {
        fs.enableErasureCodingPolicy(newPolicy.getName());
      } catch (IOException e) {
        assertExceptionContains("because its codec is not supported", e);
      }
{code}
There should be another assert right after the enable call.
{code}
      try {
        fs.enableErasureCodingPolicy(newPolicy.getName());
        assertFalse("Enabling prohibited erasure coding should fail", true);
      } catch (IOException e) {
{code}
- In _CodecRegistry#removeCodec()_, {{coderNameCompactMap}} should also be 
cleared before putting back values to avoid double entries.
Not sure if I am missing something here, but why not just remove the 
{{targetCodecName}} key from _coderNameMap_ and _coderNameCompactMap_, as being 
done for _coderMap_. Instead of clearing the map and putting back the values.

> Improve erasure coding codec framework adding more unit tests 
> --------------------------------------------------------------
>
>                 Key: HDFS-12399
>                 URL: https://issues.apache.org/jira/browse/HDFS-12399
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: erasure-coding
>    Affects Versions: 3.0.0-alpha3
>            Reporter: SammiChen
>            Assignee: SammiChen
>              Labels: hdfs-ec-3.0-nice-to-have
>         Attachments: HDFS-12399.000.patch
>
>
> Improve erasure coding codec through add more unit tests 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to