zoukankan      html  css  js  c++  java
  • 2020年暑假 (7)

    yarn集群配置启动

    1.yarn-site.xml

    <property>
    <name>yarn.resourcemanager.hostname</name>
    <value>hdp-01</value>
    </property>


    <property>
    <name>yarn.nodemanager.aux-services</name>
    <value>mapreduce_shuffle</value>
    </property>

    2.将项目打包时报错

     maven的依赖出现问题,上面注释掉的部分改为下面的内容

        <!-- <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> 
                    <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> 
                    <archive> <manifest> <mainClass>cn.edu360.mr.wc.JobSubmitterLinuxToYarn</mainClass> 
                    </manifest> </archive> </configuration> <executions> <execution> <id>make-assembly</id> 
                    this is used for inheritance merges <phase>package</phase> bind to the packaging 
                    phase <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> -->
                <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
            <execution>
                <id>make-assembly</id>
                <goals>
                    <goal>single</goal>
                </goals>
                <configuration> 
                    <descriptors> 
                         <descriptor>/assembly/assembly.xml</descriptor> 
                    </descriptors> 
                </configuration>
            </execution>
        </executions>
    </plugin>

    3.

    此依赖包并没有下载完整,删除本地的资源重新下载即可

    4.

    Caused by: java.net.URISyntaxException: Relative path in absolute URI: ‪C:%5CUsers%5Cuser%5CDesktop%5Csrc%5Cmapreduce24-0.0.1-SNAPSHOT.jar

    路径的问题,在jar包属性中复制的路径可能存在特殊字符,重新打一遍解决

     5.

     创建对应文件夹6.

     Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster

    找到hadoop安装目录mapred-site.xml,增加以下代码 

    <property>
      <name>yarn.app.mapreduce.am.env</name>
      <value>HADOOP_MAPRED_HOME=${HADOOP_HOME}</value>
    </property>
    <property>
      <name>mapreduce.map.env</name>
      <value>HADOOP_MAPRED_HOME=${HADOOP_HOME}</value>
    </property>
    <property>
      <name>mapreduce.reduce.env</name>
      <value>HADOOP_MAPRED_HOME=${HADOOP_HOME}</value>
    </property>
  • 相关阅读:
    懒加载数据,在取出数据时容易出的bug....
    小程序申请及小程序发布
    SSL证书申请及安装
    iview modal 覆盖问题
    取消div独占一行的特性
    GPS坐标互转:WGS-84(GPS)、GCJ-02(Google地图)、BD-09(百度地图)、(百度坐标转谷歌坐标)
    工厂方法模式
    STS创建SpringBoot项目
    snmp协议学习记录
    操作系统命令学习记录
  • 原文地址:https://www.cnblogs.com/ywqtro/p/13542174.html
Copyright © 2011-2022 走看看