前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Hadoop2.0 配置yarn成功

Hadoop2.0 配置yarn成功

作者头像
星哥玩云
发布2022-06-30 21:44:35
2730
发布2022-06-30 21:44:35
举报
文章被收录于专栏:开源部署开源部署

Hadoop2.0 配置yarn成功,记住这个成功的一刻,把几个主要文件贴出来:

--------------------------------------分割线 -------------------------------------- core-site.xml: <?xml version="1.0"?>  <?xml-stylesheet type="text/xsl" href="https://www.linuxidc.com/Linux/2014-05/configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>     <property>         <name>fs.defaultFS</name>         <value>hdfs://fc20:9000</value>     </property>

    <property>         <name>hadoop.tmp.dir</name>         <value>/home/ljq/hadoop/tmp</value>     </property>

    <property>         <name>hadoop.native.lib</name>         <value>false</value>         <description>Should native hadoop libraries, if present, be used.</description>     </property>  </configuration>

hdfs-site.xml: <?xml version="1.0"?>  <?xml-stylesheet type="text/xsl" href="https://www.linuxidc.com/Linux/2014-05/configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>     <property>         <name>dfs.replication</name>         <value>1</value>     </property>

    <property>         <name>dfs.namenode.name.dir</name>         <value>/home/ljq/hadoop/dfs/name</value>     </property>

    <property>         <name>dfs.datanode.data.dir</name>         <value>/home/ljq/hadoop/dfs/data</value>     </property>  </configuration>

mapred-site.xml: <?xml version="1.0"?>  <?xml-stylesheet type="text/xsl" href="https://www.linuxidc.com/Linux/2014-05/configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>     <property>         <name>mapreduce.framework.name</name>         <value>yarn</value>  一定是小写yarn否则出现错误:java.lang.IllegalStateException: Invalid shuffle port number -1     </property> </configuration>

yarn-site.xml: 文件里所有yarn都必须小写,否则相应的端口信息找不到,会在默认端口上启动进程 <?xml version="1.0"?>  <configuration>

<!-- Site specific YARN configuration properties -->

    <property>         <description>The hostname of the RM.</description>         <name>yarn.resourcemanager.hostname</name>         <value>fc20</value>     </property>     <property>         <name>yarn.nodemanager.aux-services</name>         <value>mapreduce.shuffle</value>     </property>     <property>         <description>The address of the applications manager interface in the RM.</description>         <name>yarn.resourcemanager.address</name>         <value>fc20:18004</value>     </property>     <property>         <description>The address of the scheduler interface.</description>         <name>yarn.resourcemanager.scheduler.address</name>         <value>fc20:18003</value>     </property>     <property>         <description>The address of the RM web application.</description>         <name>yarn.resourcemanager.webapp.address</name>         <value>fc20:18008</value>     </property>     <property>         <description>The address of the resource tracker interface.</description>         <name>yarn.resourcemanager.resource-tracker.address</name>         <value>fc20:18006</value>     </property>

</configuration>

通过netstat可以看见相应端口已经启动 运行wordcount以及自己写的mapreduce可以成功完成!

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
大数据
全栈大数据产品,面向海量数据场景,帮助您 “智理无数,心中有数”!
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档