<configuration>
<property>
<name>yarn.resourcemanager.address</name>
<value>c1:8032</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>c1:8030</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>c1:8031</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address</name>
<value>c1:8033</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address</name>
<value>c1:8088</value>
</property>
<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>
</configuration>
5.7. etc/hadoop/slaves
c2
c3
六:启动及验证安装是否成功
格式化:要先格式化HDFS:
bin/hdfs namenode -format
启动:
sbin/start-dfs.sh
sbin/start-yarn.sh
[root@c1 hadoop]# jps
3250 Jps
2491 ResourceManager
2343 SecondaryNameNode
2170 NameNode
datanode节点:
[root@c2 ~]# jps
4196 Jps
2061 DataNode
2153 NodeManager
--------------------------------------------------------------------------------
Ubuntu 13.04上搭建Hadoop环境
Ubuntu 12.10 +Hadoop 1.2.1版本集群配置
搭建Hadoop环境(在Winodws环境下用虚拟机虚拟两个Ubuntu系统进行搭建)
--------------------------------------------------------------------------------
1. 打开浏览器
NameNode - :50070/
2. 创建文件夹
3. $bin/hdfs dfs -mkdir /user
$ bin/hdfs dfs -mkdir /user/<username>
4. Copy 文件
$ bin/hdfs dfs -put etc/hadoop input
5. 运行作业
$ bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.3.0-cdh5.1.0.jar grep input output 'dfs[a-z.]+'
6. 查看输出
$ bin/hdfs dfs -get output output
$ cat output/*