Hadoop运行模式有三种:本地模式、伪分布式模式以及完全分布式模式。
1、本地模式
不需要额外的配置,只要执行相应的jar包即可,下面是运行官方Grep案例:
bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.2.jar grep input output 'dfs[a-z.]+'
2、伪分布式模式
2.1启动HDFS并运行MapReduce程序:
1)、配置集群
2)、启动集群
3)、查看集群
查看hdfs文件系统
http://127.0.0.1:50070/dfshealth.html#tab-overview
http://localhost:50070/dfshealth.html#tab-overview
4)、操作集群
2.2启动YARN并运行MapReduce程序
1)、配置集群在YARN上运行MR
2)、启动集群和yarn
3)、查看集群和yarn
查看yarn
http://localhost:8088/cluster
2.