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

Niels Basjes commented on HADOOP-7141:
--------------------------------------

Perhaps I do not understand the issue but when I do it it works fine (this is 
CDH3).
I think the real bug here is the qouting around the *  (i.e. the bug report 
states using '*' instead of * )

{noformat}
$ for I in 1 2 3 4 ; do echo "Hello world" > testfile-${I}.txt ; done

$ ls -laF
total 1028
drwxrwxr-x 2 nbasjes nbasjes    4096 Feb 14 17:46 ./
drwxrwxr-x 5 nbasjes nbasjes    8096 Feb 14 17:42 ../
-rw-rw-r-- 1 nbasjes nbasjes      12 Feb 14 17:46 testfile-1.txt
-rw-rw-r-- 1 nbasjes nbasjes      12 Feb 14 17:46 testfile-2.txt
-rw-rw-r-- 1 nbasjes nbasjes      12 Feb 14 17:46 testfile-3.txt
-rw-rw-r-- 1 nbasjes nbasjes      12 Feb 14 17:46 testfile-4.txt

$ hadoop fs -ls /tmp
Found 1 items
drwxrwxrwx   - nbasjes supergroup          0 2011-02-04 10:43 
/tmp/hive-beeswax-nbasjes

$ hadoop fs -put testfile-* /tmp

$ hadoop fs -ls /tmp
Found 5 items
drwxrwxrwx   - nbasjes supergroup          0 2011-02-04 10:43 
/tmp/hive-beeswax-nbasjes
-rw-r--r--   2 nbasjes supergroup         12 2011-02-14 17:47 
/tmp/testfile-1.txt
-rw-r--r--   2 nbasjes supergroup         12 2011-02-14 17:47 
/tmp/testfile-2.txt
-rw-r--r--   2 nbasjes supergroup         12 2011-02-14 17:47 
/tmp/testfile-3.txt
-rw-r--r--   2 nbasjes supergroup         12 2011-02-14 17:47 
/tmp/testfile-4.txt

$ hadoop fs -rm  /tmp/testfile-*
Deleted hdfs://master/tmp/testfile-1.txt
Deleted hdfs://master/tmp/testfile-2.txt
Deleted hdfs://master/tmp/testfile-3.txt
Deleted hdfs://master/tmp/testfile-4.txt

$ hadoop fs -ls /tmp
Found 1 items
drwxrwxrwx   - nbasjes supergroup          0 2011-02-04 10:43 
/tmp/hive-beeswax-nbasjes
{noformat}

> hadoop fs -put and -copyFromLocal do not support globs in the source path
> -------------------------------------------------------------------------
>
>                 Key: HADOOP-7141
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7141
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.20.2
>         Environment: Cloudera CDH3b3
>            Reporter: Jay Hacker
>            Priority: Minor
>
> I'd like to be able to use Hadoop globbing with the FsShell -put command, but 
> it doesn't work:
> {noformat}
> $ ls
> file1 file2
> $ hadoop fs -put '*' .
> put: File * does not exist.
> {noformat}
> This has probably gone unnoticed because your shell usually handles it, but 
> a) I'd like to be able to call 'hadoop fs' programatically without a shell, 
> b) it doesn't work in Pig or Grunt, where there is no shell helping you, and 
> c) Hadoop globbing differs from shell globbing and it would be nice to be 
> able to use Hadoop globbing consistently throughout Hadoop.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to