遇到的问题及解决方法
1、Hadoop启动正常,但是进不了web端hadoop102:9870
解决方法:查看自己的hosts文件(C:\Windows\System32\drivers\etc),发现没有配置相关网点,添加如下内容(不需要在前面加'#'):
192.168.10.100 hadoop100
192.168.10.101 hadoop101
192.168.10.102 hadoop102
192.168.10.103 hadoop103
192.168.10.104 hadoop104
192.168.10.105 hadoop105
192.168.10.106 hadoop106
192.168.10.107 hadoop107
192.168.10.108 hadoop108
2、执行语句报错
hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.3.jar wordcount /wcinput /wcoutput
报错
Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster
YARN 无法找到 MapReduce 应用程序的主类
解决方法:在mapred-site.xml添加:
<property>
<name>yarn.app.mapreduce.am.env</name>
<value>HADOOP_MAPRED_HOME=/opt/module/hadoop-3.1.3</value>
</property>
<property>
<name>mapreduce.map.env</name>
<value>HADOOP_MAPRED_HOME=/opt/module/hadoop-3.1.3</value>
</property>
<property>
<name>mapreduce.reduce.env</name>
<value>HADOOP_MAPRED_HOME=/opt/module/hadoop-3.1.3</value>
标签:Hadoop,mapreduce,192.168,hadoop,集群,3.1,HADOOP,搭建
From: https://www.cnblogs.com/shihongpin/p/18412281