错误:找不到org.apache.oozie.action.hadoop.PigMain

时间:2015-08-11 10:41:29

标签: hadoop apache-pig oozie

我试图通过oozie工作流执行一个简单的猪脚本,该工作流导入python jar以及其他一些jar并最终得到如下错误:

Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.PigMain], exception invoking main(), java.lang.ClassNotFoundException: Class org.apache.oozie.action.hadoop.PigMain not found
java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.oozie.action.hadoop.PigMain not found
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1895)
at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:224)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:430)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:342)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:163)
Caused by: java.lang.ClassNotFoundException: Class org.apache.oozie.action.hadoop.PigMain not found
at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1801)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1893)
... 9 more

Oozie Launcher failed, finishing Hadoop job gracefully

对于此工作流程,我在 lib 目录中添加了所有jar,包括 pig.jar

1 个答案:

答案 0 :(得分:3)

请检查Pig Jar应该出现在运行Oozie Workflow的节点的物理位置。

此外,您可以在Oozie Shared Lib的hadoop位置播放Pig jar,并传递参数

  

oozie.use.system.libpath = true

这些将从Shared Lib Location

读取jar