hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay Hacker (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HADOOP-7464) hadoop fs -stat '{glob}' gives null with combo of absolute and non-existent files
Date Fri, 15 Jul 2011 21:39:00 GMT
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
            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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message