System.out.println("Please put zebra.jar at hadoop_home/../jars");
System.exit(0);
}
if (whichCluster.equalsIgnoreCase("realCluster")) {
pigServer = new PigServer(ExecType.MAPREDUCE, ConfigurationUtil
.toProperties(conf));
pigServer.registerJar(zebraJar);
pathTable = new Path("/user/" + System.getenv("USER")
+ "/TestMapType");
fs = pathTable.getFileSystem(conf);
}
if (whichCluster.equalsIgnoreCase("miniCluster")) {
if (execType == ExecType.MAPREDUCE) {
cluster = MiniCluster.buildCluster();
pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
fs = cluster.getFileSystem();
pathTable = new Path(fs.getWorkingDirectory() + "TesMapType");
System.out.println("path1 =" + pathTable);
} else {
pigServer = new PigServer(ExecType.LOCAL);
}
}
BasicTable.Writer writer = new BasicTable.Writer(pathTable,
"a:string,b,c:string,d,e,f,g", "[a,b,c];[d,e,f,g]", conf);