【问题标题】:Executing Pig Shell commands through PigServer API通过 PigServer API 执行 Pig Shell 命令
【发布时间】:2014-11-05 10:33:16
【问题描述】:

我无法执行 shell 和实用程序命令 http://pig.apache.org/docs/r0.12.0/cmds.html 通过 PigServer executeBatch() 由于解析错误而失败。有输入吗?

stacktrace---

rmf /tmp/cdh/output/movie-out.csv

org.apache.pig.impl.logicalLayer.FrontendException:错误 1000:错误 在解析过程中。语法错误,出现意外符号 或靠近 'rmf'

【问题讨论】:

    标签: hadoop apache-pig cloudera hortonworks-data-platform cloudera-cdh


    【解决方案1】:

    PigServer 似乎不直接接受这些fs 命令。但是,您可以通过调用deleteFilemkdirs等方法来执行。

    http://pig.apache.org/docs/r0.12.0/api/org/apache/pig/PigServer.html#deleteFile(java.lang.String)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-08-15
      • 2011-08-20
      • 2015-11-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-24
      相关资源
      最近更新 更多