我在我的系统上安装了oozie,我也安装了猪。现在我希望ozzie从我的系统上安装的pig运行工作流而不是从ozzie sharelib运行。请帮忙,因为我收到以下错误:
2015-08-19 17:15:25,724 WARN PigActionExecutor:523 - SERVER[edb-node1] USER[hduser] GROUP[-] TOKEN[] APP[pig-wf] JOB[0000002-150819170943510-oozie-hdus-W] ACTION[0000002-150819170943510-oozie-hdus-W@pig-node] Launcher ERROR, reason: Main class [org.apache.oozie.action.hadoop.PigMain], exception invoking main(), java.lang.ClassNotFoundException: Class org.apache.oozie.action.hadoop.PigMain not found
2015-08-19 17:15:25,728 WARN PigActionExecutor:523 - SERVER[edb-node1] USER[hduser] GROUP[-] TOKEN[] APP[pig-wf] JOB[0000002-150819170943510-oozie-hdus-W] ACTION[0000002-150819170943510-oozie-hdus-W@pig-node] Launcher exception: 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:2074)
at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:234)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:450)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.runSubtask(LocalContainerLauncher.java:370)
at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.runTask(LocalContainerLauncher.java:295)
at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.access$200(LocalContainerLauncher.java:181)
at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler$1.run(LocalContainerLauncher.java:224)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: Class org.apache.oozie.action.hadoop.PigMain not found
at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1980)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2072)
... 13 more
答案 0 :(得分:1)
您已收到错误消息,清楚地表明您的CLASSPATH不完整。
那是因为 pig
命令行做了很多事情,其中包括在调用{{1}之前在CLASSPATH中静默设置适当的Pig JAR Java类。但是Oozie直接调用Java类; CLASSPATH问题应该被处理......
在提出问题之前,您是否尝试使用以下关键字在StackOverflow(和/或Google)上进行搜索?结果证明是有用的。
oozie pig custom classpath
答案 1 :(得分:0)
在上述情况下,您是否检查过是否能够访问Pig CLI {grunt shell},或者是否能够手动运行Pig Script,而不使用Oozie。
案件发生的事情是当你试图通过Oozie使用Pig Jar时无法访问,避免这样的问题的最佳案例是使用Oozie - -ShareLib,但正如你提到的那样你想要使用sharedlib同样工作,然后使用一些替代案例,如:
在Hadoop ClassPath中更新Pig Home Path。每当Oozie向MR提交请求时,这将有助于MR在HDFS Temp Location中获取Jars List。
在BashProfile中更新Pig Home {如果在使用Command not Found访问GRANT Shell时Pig显示错误}。
希望这些能帮助一些人。