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

Daryn Sharp commented on HADOOP-10392:
--------------------------------------

(while closing tabs I noticed I didn't submit this comment)

Both examples demonstrate correct behavior that should not fail.  Perhaps it's 
my pre-coffee brain, but I'm confused if you are proposing changes to streaming 
and gridmix path handling.

In the stream job example, if path is qualified as an hdfs:// path then 
{{path#makeQualified(localFs)}} should return the path as-is, _not_ rewrite it 
to localFs as described.  That would be a horrible bug!  The path should be 
qualified with the given fs if and only if the path isn't already qualified.  
Changing to {{localFs.makeQualified(path)}} is wrong because it will artificial 
fail for non-local paths.

In gridmix example, it's perfectly correct:  it's qualifying the path with its 
own fs.  For relative paths, it will qualify with the default fs.  It's a no-op 
for qualified paths because it's already qualified with the given fs.

Please elaborate on whether the current behavior is wrong, or if the patch 
requires the discussed changes - in which case the patch has introduced bugs.

> Use FileSystem#makeQualified(Path) instead of Path#makeQualified(FileSystem)
> ----------------------------------------------------------------------------
>
>                 Key: HADOOP-10392
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10392
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs
>    Affects Versions: 2.3.0
>            Reporter: Akira AJISAKA
>            Assignee: Akira AJISAKA
>            Priority: Minor
>              Labels: newbie
>         Attachments: HADOOP-10392.2.patch, HADOOP-10392.3.patch, 
> HADOOP-10392.4.patch, HADOOP-10392.4.patch, HADOOP-10392.5.patch, 
> HADOOP-10392.patch
>
>
> There're some methods calling Path.makeQualified(FileSystem), which causes 
> javac warning.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to