[
https://issues.apache.org/jira/browse/HDFS-7878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14353801#comment-14353801
]
Sergey Shelukhin commented on HDFS-7878:
----------------------------------------
in particular I wonder why getFileStatus API is privileged and has to be
consistent with getFileId.
If you call getFileStatus and open currently, you can have the same problem -
status from one file, open from different file.
ID allows to overcome this by getting ID *first*, then using ID-based path. Of
course if ID is obtained separately there's no guarantee but there's no way to
overcome this.
I don't care either way about subclass or method approach.
> API - expose an unique file identifier
> --------------------------------------
>
> Key: HDFS-7878
> URL: https://issues.apache.org/jira/browse/HDFS-7878
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Sergey Shelukhin
> Assignee: Sergey Shelukhin
> Attachments: HDFS-7878.01.patch, HDFS-7878.02.patch, HDFS-7878.patch
>
>
> See HDFS-487.
> Even though that is resolved as duplicate, the ID is actually not exposed by
> the JIRA it supposedly duplicates.
> INode ID for the file should be easy to expose; alternatively ID could be
> derived from block IDs, to account for appends...
> This is useful e.g. for cache key by file, to make sure cache stays correct
> when file is overwritten.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)