############################################################################ # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. $cfg = { 'driver' => 'Pig', 'nummachines' => 5, # 'noverify' => 'true', # 1 Test that a nested foreach gives instant feedback: after user issue the foreach statement in Grunt # 2 Test that a nested foreach gives instant feedback: as part of execution: when we run this foreach statement, we will dump the schema for the nested alias # 3 Describe single Alias resulting from a nested Foreach # 4 Describe multiple Alias resulting from a nested Foreach # 5 Describe resulting from a nested Foreach that contains a positional parameter # 6 Describe for child Alias resulting from a nested Foreach where the child alias had multiple assignments The expected behavior is that the last assignment will destermine the result of the describe statement. # 7 Describe for an Alias resulting from a nested Foreach where the projection for the nested alias is empty # 8 Describe within a foreach statement # 9 Describe for alias with complex data types # 10 Describe that uses references an alias from an AS clause 'groups' => [ { 'name' => 'Grunt', 'tests' => [ { 'num' => 1, 'pig' => "sh ls :PIGHARNESS:", 'expected_out_regex' => "libexec", 'rc' => 0 },{ 'num' => 2, 'pig' => "pwd", 'execonly' => 'mapred', # don't have a clue what their cwd will be for local mode 'expected_out_regex' => "hdfs:", 'rc' => 0 },{ 'num' => 4, 'pig' => "ls :INPATH:", ,'expected_out_regex' => ".*singlefile" ,'rc' => 0 },{ 'num' => 6, 'pig' => q\ sh touch /bin/bad \, ,'expected_err_regex' => "Permission denied" ,'rc' => 5 },{ 'num' => 7, 'pig' => "fs -ls :INPATH:", 'expected_out_regex' => ".*singlefile", 'rc' => 0 },{ 'num' => 8, 'pig' => "cat :INPATH:/singlefile/studenttab10k", 'expected_out_regex' => "gabriella brown\\t60\\t1.71", 'rc' => 0 },{ 'num' => 9, 'pig' => "cd :INPATH: pwd", 'expected_out_regex' => ".*data", 'rc' => 0 },{ 'num' => 10, 'pig' => "cp :INPATH:/singlefile/studenttab10k . ls .", 'expected_out_regex' => ".*studenttab10k", 'rc' => 0 },{ 'num' => 11, 'pig' => "cp :INPATH:/singlefile/studenttab10k ./fred ls .", 'expected_out_regex' => ".*fred", 'rc' => 0 },{ 'num' => 12, 'pig' => "cp :INPATH:/singlefile/studenttab10k ./jim mv ./jim ./bob ls .", 'expected_out_regex' => ".*bob", 'rc' => 0 },{ 'num' => 13, 'pig' => "copyToLocal :INPATH:/singlefile/studenttab10k :TMP: sh cat :TMP:/studenttab10k", 'expected_out_regex' => "gabriella brown\\t60\\t1.71", 'rc' => 0 },{ 'num' => 14, 'pig' => "copyToLocal :INPATH:/singlefile/votertab10k :TMP: copyFromLocal :TMP:/votertab10k ./joe cat ./joe", 'expected_out_regex' => "jessica xylophone\\t41\\tgreen\\t638.13", 'rc' => 0 },{ 'num' => 15, 'pig' => "rm fred bob joe", 'not_expected_out_regex' => "joe", 'rc' => 0 },{ 'num' => 16, 'pig' => "rmf jill", 'rc' => 0 } ] }, ], }, ;