提交hadoop文件出現配置 ”Please check whether your etc/hadoop/mapred-site.xml contains the below configuration“的問題
提交hadoop出來出現配置問題?
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>
然后我配置?${full path of your hadoop distribution directory} 提示如下錯誤 ?${/usr/local/hadoop/hadoop-3.0.2/share/hadoop/mapreduce*},這里HADOOP_MAPRED_HOME=到底配置為什么?
appcache/application_1552702831010_0007/container_1552702831010_0007_02_000001/launch_container.sh: line 19: ${/usr/local/hadoop/hadoop-3.0.2/share/hadoop/mapreduce*}: bad substitution
2019-05-04
我之前也是下載的hadoop 3.0版本,但是會出現很多錯誤。后來找運維朋友他建議用hadoop-2.7.3版本。
mapred-site.xml配置如下:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
??? <property>
??????? <name>mapred.job.tracker</name>
??????? <value>hdfs://localhost:9001</value>
??? </property>
??? <property>
??????? <name>mapred.tasktracker.map.tasks.maximum</name>
??????? <value>2</value>
??? </property>
??? <property>
??????? <name>mapred.tasktracker.reduce.tasks.maximum</name>
??????? <value>2</value>
??? </property>
</configuration>