hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9582) Non-existent file to "hadoop fs -conf" doesn't throw error
Date Wed, 22 May 2013 17:27:22 GMT

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

Steve Loughran commented on HADOOP-9582:
----------------------------------------

I've been looking at this a bit more, and now I'm worried about some compatibility issue.
It looks like {{-conf}} can be used to specify any resource path. Is this right, or am I misreading
it?

If I am right, I could go {{--conf ftp://common/stdconf.xml}}, or {{--conf http://service/cluster-site.xml}}.

This could be handy -so I'm worried that some people may already be using it. If they are,
we've got a problem.

At the same time, delving into {{Configuration.loadResource()}} looks like it gets the URI
of the {{Path}} instance, calls {{getPath()}} on it and then converts it to a file for loading
(skipping missing entries).

Is that right? That the {{Path}} representation of a command line path is simply an intermediate
state -and that it doesn't interfere with the intermediate state.

If backwards compatibility isn't at risk -which I think is the case- then this check is something
we can keep in, though it may be safer to build the 

{code}
  resource = new Path(value)
  File confFile = new File((resource).toUri().getPath()); //from Configuration
  if (! confFile.exists()) { throw ... }
  conf.addResource(resource);
{code}
The advantage with this approach is we can be confident the relative path resolution logic
is consistent in both places. Which is something that tests could look for as well.

(I'm just adding extra work here, aren't I? Sorry)


                
> Non-existent file to "hadoop fs -conf" doesn't throw error
> ----------------------------------------------------------
>
>                 Key: HADOOP-9582
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9582
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: conf
>    Affects Versions: 3.0.0, 0.23.7, 2.0.4-alpha
>            Reporter: Ashwin Shankar
>         Attachments: HADOOP-9582.txt, HADOOP-9582.txt
>
>
> When we run :
> hadoop fs -conf BAD_FILE -ls /
> we expect hadoop to throw an error,but it doesn't.

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

Mime
View raw message