[
https://issues.apache.org/jira/browse/HADOOP-7464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andras Bokor reassigned HADOOP-7464:
------------------------------------
Assignee: Andras Bokor
> hadoop fs -stat '{glob}' gives null with combo of absolute and non-existent
> files
> ---------------------------------------------------------------------------------
>
> Key: HADOOP-7464
> URL: https://issues.apache.org/jira/browse/HADOOP-7464
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.20.2
> Environment: CDH3u0
> Reporter: Jay Hacker
> Assignee: Andras Bokor
> Priority: Minor
>
> I'm trying to {{hadoop fs -stat}} a list of HDFS files all at once, because
> doing them one at a time is slow. stat doesn't accept multiple arguments, so
> I'm using a glob of the form '\{file1,file2\}' (quoted from the shell). I've
> discovered this doesn't work for me because the glob expands non-existent
> files to nothing, and I get nothing back from stat. It would be nice to be
> able to use stat for this, but perhaps that's more of a feature request.
> However, in the process, I discovered that with relative pathnames, I get
> back the stats for the existing files. With absolute filenames, I get back
> {{stat: null}}.
> $ hadoop fs -touchz file1 file2
> $ hadoop fs -stat '\{file1,file2\}'
> 2011-07-15 21:21:19
> 2011-07-15 21:21:19
> $ hadoop fs -stat '\{file1,file2,nonexistent\}'
> 2011-07-15 21:21:19
> 2011-07-15 21:21:19
> $ hadoop fs -stat '\{user/me/file1,/user/me/file2\}'
> 2011-07-15 21:21:19
> 2011-07-15 21:21:19
> $ hadoop fs -stat '\{/user/me/file1,/user/me/file2,nonexistent\}'
> stat: null
> Perhaps I'm doing something dumb, but it seems like stat should give the same
> results whether you use relative or absolute paths.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]