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

Tsz Wo (Nicholas), SZE commented on HDFS-5554:
----------------------------------------------

- INodeFile.isCurrentFileDeleted() is not used.

- In INodeFile, make getFileSnapshotFeature() public, then deleteCurrentFile() 
and updateQuotaAndCollectBlocks(..) can be removed.  BTW, should it call 
getFileWithSnapshotFeature() ?

- FileWithSnapshotFeature.FileWithSnapshotFeature() is not used.

- remove FileWithSnapshotFeature.recordSnapshotCopy(..).  It is only used once 
in INodeFile.  Just call sf.getDiffs().saveSelf2Snapshot(latest, this, null) 
there.

- In SnapshotFSImageFormat.saveFileDiffList(..), just call file.getDiffs().  It 
will return null if it is not with snapshot.

- IN INodeFile.cleanSubtree(..), move Quota.Counts.newInstance() after "if (sf 
!= null)", we don't need to create an instance if sf != null.


> Add Snapshot Feature to INodeFile
> ---------------------------------
>
>                 Key: HDFS-5554
>                 URL: https://issues.apache.org/jira/browse/HDFS-5554
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-5554.001.patch, HDFS-5554.002.patch
>
>
> Similar with HDFS-5285, we can add a FileWithSnapshot feature to INodeFile 
> and use it to replace the current INodeFileWithSnapshot.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to