标签:方式 程序 伪分布式 启动 namenode example lte echo 数据
Linux系统中获取JDK的安装路径
[xiaoran@hadoop101 hadoop-2.7.2]$ echo $JAVA_HOME
/opt/module/jdk1.8.0_144
修改JAVA_HOME路径
[xiaoran@hadoop101 hadoop-2.7.2]$ vim etc/hadoop/yarn-env.sh
export JAVA_HOME=/opt/module/jdk1.8.0_144
[xiaoran@hadoop101 hadoop-2.7.2]$ vim etc/hadoop/yarn-site.xml
<!-- Reducer获取数据的方式 -->
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<!-- 指定YARN的ResourceManager的地址 -->
<property>
<name>yarn.resourcemanager.hostname</name>
<value>hadoop101</value>
</property>
Linux系统中获取JDK的安装路径
[xiaoran@hadoop101 hadoop-2.7.2]$ echo $JAVA_HOME
/opt/module/jdk1.8.0_144
修改JAVA_HOME路径
[xiaoran@hadoop101 hadoop-2.7.2]$ vim etc/hadoop/mapred-env.sh
export JAVA_HOME=/opt/module/jdk1.8.0_144
[xiaoran@hadoop101 hadoop-2.7.2]$ mv mapred-site.xml.template mapred-site.xml
[xiaoran@hadoop101 hadoop-2.7.2]$ vim etc/hadoop/mapred-site.xml
<!-- 指定MR运行在YARN上 -->
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
[xiaoran@hadoop101 hadoop-2.7.2]$ sbin/yarn-daemon.sh start resourcemanager
[xiaoran@hadoop101 hadoop-2.7.2]$ sbin/yarn-daemon.sh start nodemanager
[xiaoran@hadoop101 hadoop-2.7.2]$ bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.2.jar wordcount /user/xiaoran/input /user/xiaoran/output
注意:文件 /user/xiaoran/output 事先不能存在
标签:方式 程序 伪分布式 启动 namenode example lte echo 数据
原文地址:https://www.cnblogs.com/xiaoran991/p/13881415.html