通过PigServer API执行Pig Shell命令
问题描述:
我无法执行shell和实用程序命令 http://pig.apache.org/docs/r0.12.0/cmds.html通过PigServer executeBatch()它作为解析错误失败。任何投入?通过PigServer API执行Pig Shell命令
stacktrace---
rmf /tmp/cdh/output/movie-out.csv
org.apache.pig.impl.logicalLayer.FrontendException:ERROR 1000:错误 解析过程。语法错误,在 或接近“RMF”
答
PigServer不接受这些fs
直接命令意想不到的象征,它似乎。但是,你可以像deleteFile
,mkdirs
等
通过调用方法执行见http://pig.apache.org/docs/r0.12.0/api/org/apache/pig/PigServer.html#deleteFile(java.lang.String)