• 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

  • 相关阅读:
    PhpPresentation ppt 导出PPT
    Springcloudalibaba学习实践(1) nacos环境搭建&Eureka Server搭建
    Springcloudalibaba学习实践(2) nacos&Eureka Server服务注册实践
    xna 3.1 to xna 4.0 conversion cheat sheet.(转)
    二分查找的越界以及边界值初始化问题
    决策树知识梳理
    论文分类及写作基础
    Cypher 入门笔记
    python字符串拼接
    Spring、Hibernate 事务流程分析Session生命周期
  • 原文地址:https://www.cnblogs.com/javalinux/p/14927277.html
Copyright © 2020-2023  润新知