I am embedding Pig Latin in Java, and want to check the error logs. Where
can I find them?
The program below runs fine if I don't use the line
*pigServer.registerQuery("REGISTER
'" +lib+ "';");
But fails when I use this line and I can't find the logs in the directory I
ran this from.
*
import java.io.IOException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.pig.PigServer;
public class idmapreduce {
public static void main(String[] args) {
try {
PigServer pigServer = new PigServer("mapreduce");
runIdQuery(pigServer, "passwd",
"/home/pkommireddi/dev/apps/gridforce/main/pigassist/dist/pigassist.jar");
} catch (Exception e) {}
}
public static void runIdQuery(PigServer pigServer, String inputFile,
String lib) throws IOException {
Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(conf);
Path output = new Path("idout");
fs.delete(output, true);
*pigServer.registerQuery("REGISTER '" +lib+ "';");*
pigServer.registerQuery("A = load '" + inputFile + "' using
PigStorage(':');");
pigServer.registerQuery("B = foreach A generate $0 as id;");
pigServer.store("B", "idout");
}
}
Thanks,
Prashant Kommireddi