我正在尝试运行应执行MRv1 hadoop作业的oozie工作流程。

从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:
  • 通过将以下内容更改为CDH中Oozie的配置:MapReduce服务从YARN更改为MapReduce
  • 通过设置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
  • 最佳答案

    我忘记了更新操作以使用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
    

    关于hadoop - Oozie失败-在CDH 5.4.2上运行MRv1,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/31951435/

    10-16 21:29