t1++;
String table1path = pathTable1.toString() + Integer.toString(t1);
ExecJob pigJob =pigServer.store("sort1", table1path, TableStorer.class.getCanonicalName()
+ "('[a, b, c]; [d, e, f, r1, m1]')");
if (pigJob.getException() != null){
System.out.println("******pig job exception"+ pigJob.getException().getMessage());
}
Assert.assertNull(pigJob.getException());
String query3 = "records1 = LOAD '"
+ table1path
+ "' USING org.apache.hadoop.zebra.pig.TableLoader('a, b, c, d, e, f, r1, m1', 'sorted');";
System.out.println("query3:" + query3);
pigServer.registerQuery(query3);
String foreach = "records11 = foreach records1 generate a as a, b as b, c as c, d as d, e as e, f as f, r1 as r1, m1#'a' as ma1;";
pigServer.registerQuery(foreach);
/*
* Table2 creation
*/
this.t1++;
String table2path = this.pathTable2.toString() + Integer.toString(this.t1);
pigJob = pigServer.store("sort2", table2path, TableStorer.class.getCanonicalName()
+ "('[a, b, c]; [d,e,f,r1,m1]')");
if (pigJob.getException() != null){
System.out.println("******pig job exception"+ pigJob.getException().getMessage());
}
Assert.assertNull(pigJob.getException());
String query4 = "records2 = LOAD '" + table2path
+ "' USING org.apache.hadoop.zebra.pig.TableLoader();";
pigServer.registerQuery(query4);