hadoop错误日志
个人喜欢的运行顺序:su,然后start-all,有可能存在修改ip的情况,ifconfig查看就可以,对应改core或者mapred。
运行wordcount程序一直停在map 100% reduce 0%,

input文件夹的内容:

其中:
f1.txt中的内容为:hello hadoop
f2.txt中的内容为:hello hadoop
f3.txt中的内容为:hello world
解决方法:
在/etc/hosts中增加以下红色一行,其中第一列为127.0.0.1,第二列为主机名称:

然后重新使用start-all.sh启动hadoop,然后执行wordcount程序,然后可以看到执行成功:

查看执行结果:

监控页面
http://localhost:50030/ - Hadoop 管理介面
http://localhost:50060/ - Hadoop Task Tracker 状态
http://localhost:50070/ - Hadoop DFS 状态
already exists
ERROR security.UserGroupInformation: PriviledgedActionException as:root cause:org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory /wc/output already exists

解决方案:
先删除再重新启动
ctrl+c强制退出
bin/hadoop fs -rmr /wc/output
[root@aubin hadoop-1.2.1]# hadoop jar hadoop-examples-1.2.1.jar wordcount /wc/input/ /wc/output/
然后在重新启动一次。

注意文件目录是要hdfs上的路径,然后路径ip的配置,etc/hosts里面
eclipse一直连接不上ip:
解决方案在linux里面hosts改映射条件。
windows下没办法看文件存储详细信息

还未解决:
分析原因:
看文件详细会跳转到aubin.com:50070 linux下能看到,windows不能
http://192.168.38.129:50075/browseDirectory.jsp?dir=%2Fuser%2Froot%2Finput&namenodeInfoPort=50070

前面的这个datanodeInfos是指,每遍历到一个文件,都叫这个名字。
根据hadoop的api文档去查询这些功能和函数。
百度云第52课 代码没看懂 第54课 增加的代码没看懂 以及课后作业代码