[
https://issues.apache.org/jira/browse/HADOOP-7018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12928002#action_12928002
]
Sanjay Radia commented on HADOOP-7018:
--------------------------------------
In the the design of FileContext I made FileStatus to be compatible with the
original FileStatus of FileSystem where the pathname is a full-pathname.
This was done to allow easy transition from FileSystem to FileContext; however
I believe this was a mistake.
Having a full path is messy in systems that that have symbolic links and mount
tables - the caller knows the path from which he access the file and can figure
out the
path if he is really interested. In general, it is always better to provide
relative names where possible - they have fewer closure problems in a
distributed system where there are
multiple independent contexts or roots.
Further we recently added optimization to not sent the full path across the
wire for the list directory operations.
Proposal is to create a new type, say, FileStatusInfo and have the several list
operations return that type instead of FIleStatus.
This will provide compile time error and allow folks porting over to change
their code. We can provide a helper functions
that can generate the full name for those apps that really want the full path
or want to take the easy route in porting their code from FileSystem to
FileContext.
> FileContext's list operation should return local names in the status object
> rather then the full path.
> ------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-7018
> URL: https://issues.apache.org/jira/browse/HADOOP-7018
> Project: Hadoop Common
> Issue Type: Improvement
> Reporter: Sanjay Radia
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.