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

Lei (Eddy) Xu commented on HDFS-12915:
--------------------------------------

Thanks for the patch, [~chris.douglas].  It LGTM overall.

bq. If erasureCodingPolicyID is null and blockType is stripped, it should throw 
exception. ...
bq. I also thought that was odd, but it's the existing behavior if it can be 
returned by the policy manager. 

I think the reason of this is that HDFS supports different EC policies (RS-3-2, 
RS-6-3, and etc), and the EC policy is bind to an INodeFile. Giving {{blockType 
== striped}} along is not enough to set the EC policy correctly.  

On a second thought, I think using {{ecPolicyID}} alone is sufficient, so that 
we can eliminate {{blockType}} as parameter. [~Sammi] What do you think? 


> Fix findbugs warning in INodeFile$HeaderFormat.getBlockLayoutRedundancy
> -----------------------------------------------------------------------
>
>                 Key: HDFS-12915
>                 URL: https://issues.apache.org/jira/browse/HDFS-12915
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 3.0.0
>            Reporter: Wei-Chiu Chuang
>         Attachments: HDFS-12915.00.patch, HDFS-12915.01.patch
>
>
> It seems HDFS-12840 creates a new findbugs warning.
> Possible null pointer dereference of replication in 
> org.apache.hadoop.hdfs.server.namenode.INodeFile$HeaderFormat.getBlockLayoutRedundancy(BlockType,
>  Short, Byte)
> Bug type NP_NULL_ON_SOME_PATH (click for details) 
> In class org.apache.hadoop.hdfs.server.namenode.INodeFile$HeaderFormat
> In method 
> org.apache.hadoop.hdfs.server.namenode.INodeFile$HeaderFormat.getBlockLayoutRedundancy(BlockType,
>  Short, Byte)
> Value loaded from replication
> Dereferenced at INodeFile.java:[line 210]
> Known null at INodeFile.java:[line 207]
> From a quick look at the patch, it seems bogus though. [~eddyxu][~Sammi] 
> would you please double check?



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to