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

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

I don't have too many comments about this one, since I already looked at it as 
part of the consolidated patch in HADOOP-8040.

{code}
+  private static Path qualifySymlinkTarget(final URI pathURI,
+      Path pathWithLink, Path target) {
+    // NB: makeQualified uses the target's scheme and authority, if
+    // specified, and the scheme and authority of pathURI, if not.
+    final String scheme = target.toUri().getScheme();
+    final String auth = target.toUri().getAuthority();
+    return (scheme == null && auth == null) ? target.makeQualified(pathURI,
+        pathWithLink.getParent()) : target;
+  }
{code}

seems like target.toUri() could be done once, rather than twice, to avoid extra 
work

                
> Refactor out FSLinkResolver and relevant helper methods
> -------------------------------------------------------
>
>                 Key: HADOOP-9414
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9414
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs
>    Affects Versions: 3.0.0
>            Reporter: Andrew Wang
>            Assignee: Andrew Wang
>         Attachments: hadoop-9414-1.patch, hadoop-9414-2.patch, 
> hadoop-9414-3.patch, hadoop-9414-4.patch, hadoop-9414-5.patch
>
>
> Can reuse the existing FsLinkResolver within FileContext for FileSystem as 
> well. Also move around / pull out some other reusable functions.

--
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