You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Olga Natkovich (JIRA)" <ji...@apache.org> on 2011/02/12 00:10:57 UTC

[jira] Resolved: (PIG-1844) In Pig Grunt Shell, Hadoop fs commands, 'fs -mkdir' and 'fs -touchz' do not support globbing.

     [ https://issues.apache.org/jira/browse/PIG-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olga Natkovich resolved PIG-1844.
---------------------------------

    Resolution: Invalid

Pig users Hadoop classes directly so its behavior is identical to Hadoop. What you are seeing is expension that Unix shell is doing on your behalf. If you quote the string input to the command to avoid shell expansion you will see the same result from hadoop

> In Pig Grunt Shell, Hadoop fs commands, 'fs -mkdir' and 'fs -touchz' do not support globbing.
> ---------------------------------------------------------------------------------------------
>
>                 Key: PIG-1844
>                 URL: https://issues.apache.org/jira/browse/PIG-1844
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Mitesh Singh Jat
>
> In Pig Grunt Shell, Hadoop fs commands, 'fs -mkdir' and 'fs -touchz' do not support globbing (wild-cards) in their arguments.
> This is inconsistent with the hadoop CLI interface, as well as internally inconsistent as some other pig fs commands support glob string patterns.
> The fs creation commands which create either directory {color:blue} fs -mkdir {color} or file {color:blue} fs -touchz {color} are not handling globbing.
> Whereas other commands like {color:blue} fs -ls {color} and {color:blue} fs -rmr {color} are supporting globbing.
> {code:none}
> grunt> fs -mkdir temp/dir{1,2,3}/data
> grunt> fs -lsr temp
> drwx------   - mitesh users          0 2011-02-07 08:33 /user/mitesh/temp/dir{1,2,3}
> drwx------   - mitesh users          0 2011-02-07 08:33 /user/mitesh/temp/dir{1,2,3}/data
> grunt>
> grunt>
> grunt> fs -touchz temp/dir{4,5,6}/DONE
> grunt> fs -lsr temp
> drwx------   - mitesh users          0 2011-02-07 08:33 /user/mitesh/temp/dir{1,2,3}
> drwx------   - mitesh users          0 2011-02-07 08:33 /user/mitesh/temp/dir{1,2,3}/data
> drwx------   - mitesh users          0 2011-02-07 08:41 /user/mitesh/temp/dir{4,5,6}
> -rw-------   3 mitesh users          0 2011-02-07 08:41 /user/mitesh/temp/dir{4,5,6}/DONE
> {code}
> Hadoop CLI supports globbing for arguments of {color:blue} fs -mkdir {color} and {color:blue} fs -touchz {color}.
> {code:none}
> $ hadoop fs -mkdir temp_hadoop/dir{1,2,3}/data
> $ hadoop fs -lsr temp_hadoop
> drwx------   - mitesh users          0 2011-02-07 08:46 /user/mitesh/temp_hadoop/dir1
> drwx------   - mitesh users          0 2011-02-07 08:46 /user/mitesh/temp_hadoop/dir1/data
> drwx------   - mitesh users          0 2011-02-07 08:46 /user/mitesh/temp_hadoop/dir2
> drwx------   - mitesh users          0 2011-02-07 08:46 /user/mitesh/temp_hadoop/dir2/data
> drwx------   - mitesh users          0 2011-02-07 08:46 /user/mitesh/temp_hadoop/dir3
> drwx------   - mitesh users          0 2011-02-07 08:46 /user/mitesh/temp_hadoop/dir3/data
> $
> $
> $ hadoop fs -touchz temp_hadoop/dir{4,5,6}/DONE
> $ hadoop fs -lsr temp_hadoop/dir{1,2,3,4,5,6}
> drwx------   - mitesh users          0 2011-02-07 08:46 /user/mitesh/temp_hadoop/dir1/data
> drwx------   - mitesh users          0 2011-02-07 08:46 /user/mitesh/temp_hadoop/dir2/data
> drwx------   - mitesh users          0 2011-02-07 08:46 /user/mitesh/temp_hadoop/dir3/data
> -rw-------   3 mitesh users          0 2011-02-07 08:47 /user/mitesh/temp_hadoop/dir4/DONE
> -rw-------   3 mitesh users          0 2011-02-07 08:47 /user/mitesh/temp_hadoop/dir5/DONE
> -rw-------   3 mitesh users          0 2011-02-07 08:47 /user/mitesh/temp_hadoop/dir6/DONE
> {code}
> Pig grunt shell supports globbing for arguments of {color:blue} fs -ls {color}, {color:blue} fs -rmr {color}, etc.
> {code:none}
> grunt> fs -lsr temp_hadoop/dir{1,2,3,4,5,6}
> drwx------   - mitesh users          0 2011-02-07 08:46 /user/mitesh/temp_hadoop/dir1/data
> drwx------   - mitesh users          0 2011-02-07 08:46 /user/mitesh/temp_hadoop/dir2/data
> drwx------   - mitesh users          0 2011-02-07 08:46 /user/mitesh/temp_hadoop/dir3/data
> -rw-------   3 mitesh users          0 2011-02-07 08:47 /user/mitesh/temp_hadoop/dir4/DONE
> -rw-------   3 mitesh users          0 2011-02-07 08:47 /user/mitesh/temp_hadoop/dir5/DONE
> -rw-------   3 mitesh users          0 2011-02-07 08:47 /user/mitesh/temp_hadoop/dir6/DONE
> {code}

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