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

Kihwal Lee commented on HADOOP-8240:
------------------------------------

The new patch addresses the review comments, except 
{{CHECKSUM_UNINIT}}/{{Type.UNINIT}}.

If an unknown checksum type is read from a conf, we fall back to the {{NULL}} 
type. But when a user only specifies {{bytesPerChecksum}} through an old API, 
the configured type must be used. For this reason an unspecified checksum type 
cannot be treated as the {{NULL}} type, because this means disabling checksum.

"{{UNINIT}}" is confusing, since it really means "use default". So I changed it 
to {{CHECKSUM_DEFAULT}}/{{Type.DEFAULT}}. Users may explicitly set checksum 
type to this to let the system pick up the configured type, in addition to the 
old API scenario.  {{bytesPerChecksum}} works similarly when set to -1.

                
> Allow users to specify a checksum type on create()
> --------------------------------------------------
>
>                 Key: HADOOP-8240
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8240
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>    Affects Versions: 0.23.0
>            Reporter: Kihwal Lee
>            Assignee: Kihwal Lee
>             Fix For: 2.1.0-alpha
>
>         Attachments: hadoop-8240.patch, 
> hadoop-8240-post-hadoop-8700-br2-trunk.patch.txt, 
> hadoop-8240-post-hadoop-8700-br2-trunk.patch.txt, 
> hadoop-8240-trunk-branch2.patch.txt, hadoop-8240-trunk-branch2.patch.txt, 
> hadoop-8240-trunk-branch2.patch.txt
>
>
> Per discussion in HADOOP-8060, a way for users to specify a checksum type on 
> create() is needed. The way FileSystem cache works makes it impossible to use 
> dfs.checksum.type to achieve this. Also checksum-related API is at 
> Filesystem-level, so we prefer something at that level, not hdfs-specific 
> one.  Current proposal is to use CreatFlag.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to