You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by da...@apache.org on 2012/03/26 09:43:33 UTC

svn commit: r1305248 - in /pig/branches/branch-0.10/test/e2e/pig: deployers/ExistingClusterDeployer.pm deployers/LocalDeployer.pm tests/nightly.conf tests/streaming.conf tools/generate/generate_data.pl

Author: daijy
Date: Mon Mar 26 07:43:33 2012
New Revision: 1305248

URL: http://svn.apache.org/viewvc?rev=1305248&view=rev
Log:
Fix several e2e test failures

Modified:
    pig/branches/branch-0.10/test/e2e/pig/deployers/ExistingClusterDeployer.pm
    pig/branches/branch-0.10/test/e2e/pig/deployers/LocalDeployer.pm
    pig/branches/branch-0.10/test/e2e/pig/tests/nightly.conf
    pig/branches/branch-0.10/test/e2e/pig/tests/streaming.conf
    pig/branches/branch-0.10/test/e2e/pig/tools/generate/generate_data.pl

Modified: pig/branches/branch-0.10/test/e2e/pig/deployers/ExistingClusterDeployer.pm
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.10/test/e2e/pig/deployers/ExistingClusterDeployer.pm?rev=1305248&r1=1305247&r2=1305248&view=diff
==============================================================================
--- pig/branches/branch-0.10/test/e2e/pig/deployers/ExistingClusterDeployer.pm (original)
+++ pig/branches/branch-0.10/test/e2e/pig/deployers/ExistingClusterDeployer.pm Mon Mar 26 07:43:33 2012
@@ -218,11 +218,16 @@ sub generateData
             'filetype' => "voternulltab",
             'rows' => 10000,
             'hdfs' => "singlefile/voternulltab10k",
-        }, , {
+        }, {
             'name' => "allscalar10k",
             'filetype' => "allscalar",
             'rows' => 10000,
             'hdfs' => "singlefile/allscalar10k",
+        }, {
+            'name' => "numbers.txt",
+            'filetype' => "numbers",
+            'rows' => 5000,
+            'hdfs' => "types/numbers.txt",
         }
     );
 

Modified: pig/branches/branch-0.10/test/e2e/pig/deployers/LocalDeployer.pm
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.10/test/e2e/pig/deployers/LocalDeployer.pm?rev=1305248&r1=1305247&r2=1305248&view=diff
==============================================================================
--- pig/branches/branch-0.10/test/e2e/pig/deployers/LocalDeployer.pm (original)
+++ pig/branches/branch-0.10/test/e2e/pig/deployers/LocalDeployer.pm Mon Mar 26 07:43:33 2012
@@ -199,6 +199,11 @@ sub generateData
             'filetype' => "allscalar",
             'rows' => 10000,
             'outfile' => "singlefile/allscalar10k",
+        }, {
+            'name' => "numbers.txt",
+            'filetype' => "numbers",
+            'rows' => 5000,
+            'outfile' => "types/numbers.txt",
         }
     );
 

Modified: pig/branches/branch-0.10/test/e2e/pig/tests/nightly.conf
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.10/test/e2e/pig/tests/nightly.conf?rev=1305248&r1=1305247&r2=1305248&view=diff
==============================================================================
--- pig/branches/branch-0.10/test/e2e/pig/tests/nightly.conf (original)
+++ pig/branches/branch-0.10/test/e2e/pig/tests/nightly.conf Mon Mar 26 07:43:33 2012
@@ -3621,11 +3621,11 @@ describe E;
 describe F;
 describe G;
 ?
-                         ,'expected_out_regex'  => 'C: {{NULL}}'
-                         ,'expected_out_regex'  => 'D: {{int}}'
-                         ,'expected_out_regex'  => 'E: {{float}}'
-                         ,'expected_out_regex'  => 'F: {{long}}'
-                         ,'expected_out_regex'  => 'G: {{double}}'
+                         ,'expected_out_regex'  => 'C: {{\\(NULL\\)}}'
+                         ,'expected_out_regex'  => 'D: {{\\(int\\)}}'
+                         ,'expected_out_regex'  => 'E: {{\\(float\\)}}'
+                         ,'expected_out_regex'  => 'F: {{\\(long\\)}}'
+                         ,'expected_out_regex'  => 'G: {{\\(double\\)}}'
 
 			}, {
 # TEST : TOBAG/TOTUPLE with simple types
@@ -4424,7 +4424,7 @@ store C into ':OUTPATH:';\, 
                             C1 = filter A by gpa > 4;
                             C2 = filter B by contributions > 500;
                             C3 = cross C1, C2;
-                            C4 = foreach C3 generate CONCAT(CONCAT(gpa, '_'), contributions);
+                            C4 = foreach C3 generate CONCAT(CONCAT((chararray)gpa, '_'), (chararray)contributions);
                             generate flatten(C4);
                         }
                         store D into ':OUTPATH:';\,
@@ -4434,7 +4434,7 @@ store C into ':OUTPATH:';\, 
                         C = filter A by gpa > 4;
                         D = filter B by contributions > 500;
                         E = JOIN C by name, D by name;
-                        F = foreach E generate CONCAT(CONCAT(gpa, '_'), contributions);
+                        F = foreach E generate CONCAT(CONCAT((chararray)gpa, '_'), (chararray)contributions);
                         store F into ':OUTPATH:';\,
                 },
               ]

Modified: pig/branches/branch-0.10/test/e2e/pig/tests/streaming.conf
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.10/test/e2e/pig/tests/streaming.conf?rev=1305248&r1=1305247&r2=1305248&view=diff
==============================================================================
--- pig/branches/branch-0.10/test/e2e/pig/tests/streaming.conf (original)
+++ pig/branches/branch-0.10/test/e2e/pig/tests/streaming.conf Mon Mar 26 07:43:33 2012
@@ -396,6 +396,7 @@ store B into ':OUTPATH:.intermediate';
 C = stream B through CMD2 as (name, age, gpa);
 D = JOIN B by name, C by name;
 store D into ':OUTPATH:';#,
+                        'notmq' => 1,
                         'sql' => "select A.name, A.age, A.gpa, B.name, B.age, B.gpa from studenttab10k as A join studenttab10k as B using(name);",	
 			},
 			{
@@ -426,6 +427,7 @@ C = stream B through CMD1;
 D = stream C through CMD2;
 E = JOIN B by $0, D by $0;
 store E into ':OUTPATH:';#,
+                        'notmq' => 1,
                         'sql' => "select A.name, A.age, A.gpa, B.name, B.age, B.gpa from studenttab10k as A join studenttab10k as B using(name);",	
 			},
 			{
@@ -453,6 +455,7 @@ C = stream B through `cat` as (name:char
 store C into ':OUTPATH:.intermediate';
 D = join A by $0, C by $0;
 store D into ':OUTPATH:';#,
+                        'notmq' => 1,
                         'sql' => "select A.name, A.age, A.gpa, B.name, B.age, B.gpa from studenttab10k as A join studenttab10k as B using(name) where b.age > 25;",	
 			},
 			{
@@ -467,6 +470,7 @@ store B into ':OUTPATH:.intermediate';
 C = foreach A generate $0, $1 + 100, $2 + 100.0;
 D = join C by $0, B by $0;
 store D into ':OUTPATH:';#,
+                        'notmq' => 1,
                         'sql' => "select A.name, A.age + 100, A.gpa + 100.0, B.name, B.age, B.gpa from studenttab10k as A join studenttab10k as B using(name);",	
 			},
 			]

Modified: pig/branches/branch-0.10/test/e2e/pig/tools/generate/generate_data.pl
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.10/test/e2e/pig/tools/generate/generate_data.pl?rev=1305248&r1=1305247&r2=1305248&view=diff
==============================================================================
--- pig/branches/branch-0.10/test/e2e/pig/tools/generate/generate_data.pl (original)
+++ pig/branches/branch-0.10/test/e2e/pig/tools/generate/generate_data.pl Mon Mar 26 07:43:33 2012
@@ -463,6 +463,16 @@ sub getBulkCopyCmd(){
             my $instate = rand(1) < 0.05 ? '' : (rand(1) < 0.5 ? 'true' : 'false');
             printf HDFS "%s\t%d\t%.2f\t%s\n", $name, $age, $gpa, $instate;
         }
+    } elsif ($filetype eq "numbers") {
+        srand(2012 + $numRows);
+        for (my $i = 0; $i < $numRows; $i++) {
+            my $tid = ($i/1000+1) * 1000;
+            my $rand5 = int(rand(5)) + 1;
+            my $rand100 = int(rand(100)) + 1;
+            my $rand1000 = int(rand(1000)) + 1;
+            my $randf = rand(10);
+            printf HDFS "%d:%d:%d:%d:%d:%dL:%.2ff:%.2f\n", $tid, $i, $rand5, $rand100, $rand1000, $rand1000, $randf, $randf;
+        }
     } else {
         warn "Unknown filetype $filetype\n";
         usage();