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

Zhe Zhang commented on HDFS-7104:
---------------------------------

[~jingzhao] Thanks for reviewing again. 

bq. looks like now we can declare inodes as final.

{{fromINode()}} is still used in a few places which tries to set the {{inodes}} 
array.

bq. Optional: there are also two javadoc errors in INodesInPath (for 
snapshotRootIndex and getSnapshotRootIndex). Maybe we can use this chance to 
fix them.

I agree. How about the below:
{code} index of the null inode introduced by the snapshot dir in {@link 
#inodes}, -1 for non-snapshot paths. {code}

> Fix and clarify INodeInPath getter functions
> --------------------------------------------
>
>                 Key: HDFS-7104
>                 URL: https://issues.apache.org/jira/browse/HDFS-7104
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Zhe Zhang
>            Assignee: Zhe Zhang
>            Priority: Minor
>         Attachments: HDFS-7104-20140923-v1.patch, 
> HDFS-7104-20140923-v3.patch, HDFS-7104-20140924-v1.patch
>
>
> inodes is initialized with the number of patch components. After resolve, it 
> contains both non-null and null elements (introduced by dot-snapshot dirs).
> When getINodes is called, an array is returned excluding all non elements, 
> which is the correct behavior. Meanwhile, the inodes array is trimmed too, 
> which shouldn't be done by a getter.
> Because of the above, the behavior of getINodesInPath depends on whether 
> getINodes has been called, which is not correct.
> The name of getLastINodeInPath is confusing – it actually returns the last 
> non-null inode in the path. Also, shouldn't the return type be a single INode?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to