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:shell} 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:shell} $ 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:shell} 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