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:55 UTC
svn commit: r1305249 - in /pig/trunk/test/e2e/pig:
deployers/ExistingClusterDeployer.pm deployers/LocalDeployer.pm
tests/nightly.conf tests/streaming.conf tests/turing_jython.conf
tools/generate/generate_data.pl
Author: daijy
Date: Mon Mar 26 07:43:54 2012
New Revision: 1305249
URL: http://svn.apache.org/viewvc?rev=1305249&view=rev
Log:
Fix several e2e test failures
Modified:
pig/trunk/test/e2e/pig/deployers/ExistingClusterDeployer.pm
pig/trunk/test/e2e/pig/deployers/LocalDeployer.pm
pig/trunk/test/e2e/pig/tests/nightly.conf
pig/trunk/test/e2e/pig/tests/streaming.conf
pig/trunk/test/e2e/pig/tests/turing_jython.conf
pig/trunk/test/e2e/pig/tools/generate/generate_data.pl
Modified: pig/trunk/test/e2e/pig/deployers/ExistingClusterDeployer.pm
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/deployers/ExistingClusterDeployer.pm?rev=1305249&r1=1305248&r2=1305249&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/deployers/ExistingClusterDeployer.pm (original)
+++ pig/trunk/test/e2e/pig/deployers/ExistingClusterDeployer.pm Mon Mar 26 07:43:54 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/trunk/test/e2e/pig/deployers/LocalDeployer.pm
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/deployers/LocalDeployer.pm?rev=1305249&r1=1305248&r2=1305249&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/deployers/LocalDeployer.pm (original)
+++ pig/trunk/test/e2e/pig/deployers/LocalDeployer.pm Mon Mar 26 07:43:54 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/trunk/test/e2e/pig/tests/nightly.conf
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/tests/nightly.conf?rev=1305249&r1=1305248&r2=1305249&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/tests/nightly.conf (original)
+++ pig/trunk/test/e2e/pig/tests/nightly.conf Mon Mar 26 07:43:54 2012
@@ -3729,11 +3729,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
@@ -4600,7 +4600,7 @@ store a 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:';\,
@@ -4610,7 +4610,7 @@ store a 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/trunk/test/e2e/pig/tests/streaming.conf
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/tests/streaming.conf?rev=1305249&r1=1305248&r2=1305249&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/tests/streaming.conf (original)
+++ pig/trunk/test/e2e/pig/tests/streaming.conf Mon Mar 26 07:43:54 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/trunk/test/e2e/pig/tests/turing_jython.conf
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/tests/turing_jython.conf?rev=1305249&r1=1305248&r2=1305249&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/tests/turing_jython.conf (original)
+++ pig/trunk/test/e2e/pig/tests/turing_jython.conf Mon Mar 26 07:43:54 2012
@@ -997,8 +997,8 @@ from org.apache.pig.scripting import Pig
#create pig script
-ret = Pig.sql("""sql drop table if exists pig_script_hcat_ddl_1;
-sql create table pig_script_hcat_ddl_1(name string,
+ret = Pig.sql("""drop table if exists pig_script_hcat_ddl_1;
+create table pig_script_hcat_ddl_1(name string,
age int,
gpa double)
stored as textfile;
Modified: pig/trunk/test/e2e/pig/tools/generate/generate_data.pl
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/tools/generate/generate_data.pl?rev=1305249&r1=1305248&r2=1305249&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/tools/generate/generate_data.pl (original)
+++ pig/trunk/test/e2e/pig/tools/generate/generate_data.pl Mon Mar 26 07:43:54 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();