1
我想在windows中从eclipse执行Pig脚本。我跟着this link。但它不起作用。有没有需要做任何插件?或只有pig.jar
很好?如何使用eclipse来编写和执行PIG拉丁文
我想在windows中从eclipse执行Pig脚本。我跟着this link。但它不起作用。有没有需要做任何插件?或只有pig.jar
很好?如何使用eclipse来编写和执行PIG拉丁文
试试这个,它的工作原理
Runtime runTime = Runtime.getRuntime();
String pigCommand = "pig -f "+pigPath+" //pigPath must be hdfs path.
Process proc = runTime.exec(pigCommand);
BufferedReader bri = new BufferedReader(new InputStreamReader(proc.getInputStream()));
BufferedReader bre = new BufferedReader(new InputStreamReader(proc.getErrorStream()));
String line = "";
while ((line = bri.readLine()) != null);
while ((line = bre.readLine()) != null);