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

Wei-Chiu Chuang commented on HADOOP-13665:
------------------------------------------

[~lewuathe] thanks again for your quick turn-around!

The v10 patch looks very close.

A few nits
* IO_ERASURECODE_CODEC_XOR_RAWCODERS_DEFAULT should also support native 
fallback, and its value should be 
org.apache.hadoop.io.erasurecode.rawcoder.NativeXORRawErasureCoderFactory,org.apache.hadoop.io.erasurecode.rawcoder.XORRawErasureCoderFactory.
 io.erasurecode.codec.xor.rawcoders in core-default should be updated as well.
* In getRawCoders(), io.erasurecode.codec. can be replaced by 
IO_ERASURECODE_CODEC.
* The private method getRawCoderFactNameFromCodec() is no longer used, and its 
use is replaced by createRawEncoderWithFallback() and 
createRawDecoderWithFallback. It should be removed if I understand it 
correctly. The associated variables such as 
IO_ERASURECODE_CODEC_RS_LEGACY_RAWCODER_KEY should also be removed as well 
because they are not used.
* In createRawEncoderWithFallback() and createRawDecoderWithFallback(), I think 
it's better to print the exception so that we know what goes wrong. So instead 
of
{code}
LOG.warn("Failed to create raw erasure encoder " + factName +
            ", fallback to next codec if possible");
{code}, do 
{code}
LOG.warn("Failed to create raw erasure encoder " + factName +
            ", fallback to next codec if possible", e);
{code}

* We should also update the documentation HDFSErasureCoding.md, but I prefer to 
do that in a separate jira.

> Erasure Coding codec should support fallback coder
> --------------------------------------------------
>
>                 Key: HADOOP-13665
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13665
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: io
>            Reporter: Wei-Chiu Chuang
>            Assignee: Kai Sasaki
>            Priority: Blocker
>              Labels: hdfs-ec-3.0-must-do
>         Attachments: HADOOP-13665.01.patch, HADOOP-13665.02.patch, 
> HADOOP-13665.03.patch, HADOOP-13665.04.patch, HADOOP-13665.05.patch, 
> HADOOP-13665.06.patch, HADOOP-13665.07.patch, HADOOP-13665.08.patch, 
> HADOOP-13665.09.patch, HADOOP-13665.10.patch
>
>
> The current EC codec supports a single coder only (by default pure Java 
> implementation). If the native coder is specified but is unavailable, it 
> should fallback to pure Java implementation.
> One possible solution is to follow the convention of existing Hadoop native 
> codec, such as transport encryption (see {{CryptoCodec.java}}). It supports 
> fallback by specifying two or multiple coders as the value of property, and 
> loads coders in order.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to