Author: hashutosh
Date: Tue Jan 24 12:21:42 2012
New Revision: 1235220
URL: http://svn.apache.org/viewvc?rev=1235220&view=rev
Log:
More of HCATALOG-219. HCATALOG-219-6.patch this time
Modified:
incubator/hcatalog/branches/branch-0.3/src/test/e2e/hcatalog/tests/pig.conf
Modified:
incubator/hcatalog/branches/branch-0.3/src/test/e2e/hcatalog/tests/pig.conf
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/branches/branch-0.3/src/test/e2e/hcatalog/tests/pig.conf?rev=1235220&r1=1235219&r2=1235220&view=diff
==============================================================================
--- incubator/hcatalog/branches/branch-0.3/src/test/e2e/hcatalog/tests/pig.conf
(original)
+++ incubator/hcatalog/branches/branch-0.3/src/test/e2e/hcatalog/tests/pig.conf
Tue Jan 24 12:21:42 2012
@@ -179,11 +179,19 @@ store b into 'pig_write_3' using org.apa
'tests' => [
{
'num' => 1
+ ,'hcat_prep'=>q\drop table if exists
pig_hbase_1;
+create table pig_hbase_1(key string, age string, gpa string) STORED BY
'org.apache.hcatalog.hbase.HBaseHCatStorageHandler' TBLPROPERTIES
('hbase.columns.mapping'=':key,info:age,info:gpa');\
,'pig' => q\set hcat.hbase.output.bulkMode
'false'
+a = load ':INPATH:/studenttab10k' as (name:chararray, age:int, gpa:float);
+b = group a by name;
+c = foreach b generate group as name, AVG(a.age) as age, AVG(a.gpa) as gpa;
+d = foreach c generate name as key, (chararray)age, (chararray)gpa as gpa;
+store d into 'pig_hbase_1' using org.apache.hcatalog.pig.HCatStorer();
+exec
e = load 'pig_hbase_1' using org.apache.hcatalog.pig.HCatLoader();
store e into ':OUTPATH:';\,
- ,'result_table' => ['?']
- ,'sql' => [ 'select name, avg(cast(age as
decimal(10,5))), avg(gpa) from studenttab10k group by name;']
+ ,'result_table' => ['pig_hbase_1','?']
+ ,'sql' => [ 'select name, avg(cast(age as
decimal(10,5))), avg(gpa) from studenttab10k group by name;', 'select name,
avg(cast(age as decimal(10,5))), avg(gpa) from studenttab10k group by name;' ]
,'floatpostprocess' => 1
,'delimiter' => ' '
},