本文主要是介绍yarn resourceManager 找不到nodeManager,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
尤其注意:master和slave都要配置1首先是配置core-site.xml
(注意:主机配置下hapoop缓存目录
<property>
<name>hadoop.tmp.dir</name>
<value>/hadoop_tmp</value>
</property>
)
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://master:9000</value>
</property>
</configuration>
2配置mapred-site.xml
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
3配置yarn-site.xml
(注意:master机器还需要配置:hostname
<property>
<name>yarn.resourcemanager.hostname</name>
<value>master</value>
</property>
)
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>master:8030</value>
</property>
<property>
<name>yarn.resourcemanager.address</name>
<value>master:8032</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address</name>
<value>master:8088</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>master:8031</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address</name>
<value>master:8033</value>
</property>
</configuration>
4:配置hdfs-site.xml(用于免密登录)
<configuration>
<property>
<name>dfs.permissions.enabled</name>
<value>false</value>
</property>
</configuration>
5:验证一下yarn
启动hdfs:start-dfs.sh
启动yarn:start-yarn.sh
创建文件 wordcount.txt
丢到hdfs中 hadoop fs -put /wordcount.txt /input/
启动wordcount程序:hadoop jar /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.3.jar wordcount /input/wordcount.txt /output
可以通过网页观看任务的执行
查看结果:hadoop fs -text /output/part-r-00000
这篇关于yarn resourceManager 找不到nodeManager的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!