再会!
我尝试使用 PigServer.java。这是我的代码:
PigServer pigServer = new PigServer(ExecType.LOCAL);
final Map<String, String> predefinedParams = getPredefinedParams();
pigServer.debugOn();
pigServer.setBatchOn();
pigServer.registerScript(DEST_SCRIPT.getAbsolutePath(), predefinedParams);
pigServer.executeBatch();
pigServer.shutdown();
当我在 WinXp 上运行它时一切正常。但是当我在 Win7 上尝试时,会发生异常:
ERROR mapReduceLayer.Launcher: Backend error message during job submission
java.io.IOException: Cannot run program "chmod": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
................
这是我的猪脚本的内容:
result = LOAD '$data' USING PigStorage('\t') AS (user, time, query);
STORE result INTO '$output' USING PigStorage();
你有什么想法,为什么会发生这种情况?