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

Colin Patrick McCabe commented on HADOOP-8040:
----------------------------------------------

bq. I refactored these out of FileContext and decided to stick them in Path. 
Seems kind of weird to have a "check" instance method that throws an exception 
like this, so I'd mildly prefer to leave them static.

I'll leave it up to you, but I really prefer instance methods in this case.

bq. Semantics for all the local filesystems is kinda fuzzy, but I agree that 
this feels incorrect. I'd prefer to fix both of these classes at once though in 
a follow-on JIRA (especially if JNI is potentially involved).

OK.  I filed HADOOP-9652 for this.

bq. Hmm, interesting comment, good eye. The issue here is that since symlinks 
can point to other filesystems, we have to return a FileStatus, not an 
HdfsFileStatus. Plain old FileStatus doesn't have fileId, so we have to leave 
it out. I think this is okay from a user perspective, since FileSystem methods 
only return FileStatus, and HdfsFileStatus isn't a subclass of FileStatus 
anyway.

Yeah, given that it has to be copied anyway, this is probably fine.  Can you 
add a comment?

bq. I think this is as intended. The new inner class sometimes needs to wrap 
final parameters of the containing method. Since the params are different each 
time (and different per call), I think it needs to do this at runtime.

OK.

bq. I think the intent here was to just pick a reasonable upper bound. I doubt 
any real user has >32 links to links, and I don't think there's a reason to 
tune it down either.

Looks like there was some discussion on this earlier: 
https://issues.apache.org/jira/browse/HDFS-245?focusedCommentId=12642970&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12642970

32 is probably fine for now.  If we ever need it to be configurable, we can do 
that in a separate JIRA.
                
> Add symlink support to FileSystem
> ---------------------------------
>
>                 Key: HADOOP-8040
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8040
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>    Affects Versions: 0.23.0, 3.0.0, 2.0.3-alpha
>            Reporter: Eli Collins
>            Assignee: Andrew Wang
>         Attachments: hadoop-8040-1.patch, hadoop-8040-2.patch, 
> hadoop-8040-3.patch, hadoop-8040-4.patch, hadoop-8040-5.patch, 
> hadoop-8040-6.patch
>
>
> HADOOP-6421 added symbolic links to FileContext. Resolving symlinks is done 
> on the client-side, and therefore requires client support. An HDFS symlink 
> (created by FileContext) when accessed by FileSystem will result in an 
> unhandled UnresolvedLinkException. Because not all users will migrate from 
> FileSystem to FileContext in lock step, and we want users of FileSystem to be 
> able to access all paths created by FileContext, we need to support symlink 
> resolution in FileSystem as well, to facilitate migration to FileContext.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to