Oozie失败 - 在CDH 5.4.2上运行MRv1

时间:2015-08-11 20:34:11

标签: hadoop oozie cloudera-cdh

我试图运行oozie工作流程,应该执行MRv1 hadoop工作。

开始使用Cloudera QuickStart VM 5.4.2-0。将其配置为使用MRv1(附在底部)。

但工作流程失败了:

Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.MapReduceMain], main() threw exception, org/apache/hadoop/yarn/exceptions/YarnException
java.lang.NoClassDefFoundError: org/apache/hadoop/yarn/exceptions/YarnException
    at org.apache.oozie.action.hadoop.MapReduceMain.run(MapReduceMain.java:58)
    at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:46)
    at org.apache.oozie.action.hadoop.MapReduceMain.main(MapReduceMain.java:38)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:228)
    at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50)
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:417)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:332)
    at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
    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:1671)
    at org.apache.hadoop.mapred.Child.main(Child.java:262)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.yarn.exceptions.YarnException
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

奇怪的是,当我查看类路径时,它正在从正确的位置加载jar文件;即/usr/lib/hadoop-0.20-mapreduce

----- ----配置

  • 配置OOzie使用MapReduce而不是yarn:

    • 通过更改:从YARNMapReduce
    • 的MapReduce服务,更改了CDH中Oozie的配置
    • 通过设置oozie-site.xml阀值来更改Oozie的配置:

      <property> <name>oozie.service.HadoopAccessorService.jobTracker.whitelist</name> <value>quickstart.cloudera:8021</value> </property>

    • 使用替代方案更改了tomcat配置: sudo alternatives --config oozie-tomcat-deployment -- chose tomcat-conf.http.mr1

  • 配置Hadoop以使用MapReduce: sudo alternatives --config hadoop-conf -- chose conf.cloudera.mapreduce

1 个答案:

答案 0 :(得分:0)

我忘了更新使用MR1的操作:

$ sudo -u oozie hadoop fs -rmr /user/oozie/share

sudo oozie-setup sharelib create -fs <FS_URI> -locallib /usr/lib/oozie/oozie-sharelib-mr1