配置
ssh localhost
ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
生成ssh公钥私钥cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
ssh localhost
第一次会出现提示,输入”yes”即可
###
理解
- 宏观上,Hadoop每个作业要经历两个阶段:Map phase和reduce phase。对于Map phase,又主要包含四个子阶段:从磁盘上读数据->执行map函数->combine结果->将结果写到本地磁盘上;对于reduce phase,同样包含四个子阶段:从各个map task上读相应的数据(shuffle)->sort->执行reduce函数->将结果写到HDFS中。
页面
- hdfs namenode页面 http://localhost:50070/dfshealth.html
- yarn页面 http://localhost:8088/cluster
常用命令
hadoop jar hadoop-sample-0.1.jar com.wzk.hadoop.wordcount.WordCount2 readme.txt output
需要注意的是输出目录不能存在,会报错