zoukankan      html  css  js  c++  java
  • IDEA SpringBoot集成hadoop运行环境,,本地启动项目,GET请求接口触发远程提交MapReduce任务至生产集群报错

    报错明细

    IDEA SpringBoot集成hadoop运行环境,,本地启动项目,GET请求接口触发远程提交MapReduce任务至生产集群报错:

    Failing this attempt.Diagnostics: [2020-02-17 00:44:42.444]Exception from container-launch.
    Container id: container_1577273840515_114930_02_000001
    Exit code: 1
    
    [2020-02-17 00:44:42.450]Container exited with a non-zero exit code 1. Error file: prelaunch.err.
    Last 4096 bytes of prelaunch.err :
    Last 4096 bytes of stderr :
    Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster
    
    Please check whether your etc/hadoop/mapred-site.xml contains the below configuration:
    <property>
      <name>yarn.app.mapreduce.am.env</name>
      <value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>
    </property>
    <property>
      <name>mapreduce.map.env</name>
      <value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>
    </property>
    <property>
      <name>mapreduce.reduce.env</name>
      <value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>
    </property>
    
    [2020-02-17 00:44:42.456]Container exited with a non-zero exit code 1. Error file: prelaunch.err.
    Last 4096 bytes of prelaunch.err :
    Last 4096 bytes of stderr :
    Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster
    
    Please check whether your etc/hadoop/mapred-site.xml contains the below configuration:
    <property>
      <name>yarn.app.mapreduce.am.env</name>
      <value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>
    </property>
    <property>
      <name>mapreduce.map.env</name>
      <value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>
    </property>
    <property>
      <name>mapreduce.reduce.env</name>
      <value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>
    </property>
    
    For more detailed output, check the application tracking page: http://server172-20-22-11:8088/cluster/app/application_1577273840515_114930 Then click on links to logs of each attempt.
    . Failing the application.
    

    问题解决

    首先要保证,在我们本地Wind10上面已经在环境变量里设置了HADOOP_HOME,并将$HADOOP_HOME添加进了PATH中。
    接着,从生产集群上将core-site.xml、mapred-site.xml、yarn-site.xml这三个文件拷下来,放到resources文件夹下,与yml文件放在一起,like this:


    接着再运行:


    问题解决。

     转自:https://uzshare.com/view/816421

  • 相关阅读:
    Java 并发理论简述
    Java 并发之原子性与可见性
    JVM 简述
    【算法导论】第5章,概率分析和随机算法
    【算法导论】第3、4章,增长和递归式
    【python】matplotlib进阶
    【dlbook】实践方法论
    【dlbook】优化
    【dlbook】正则化
    【dlbook】深度网络
  • 原文地址:https://www.cnblogs.com/javalinux/p/14927277.html
Copyright © 2011-2022 走看看