调试相关:
=============
安装HDFS(即格式化):
hadoop namenode -format
hadoop jar ./hadoop-examples-1.2.1.jar pi 10 100
==============
1.可以在http://localhost:50070 看到hdfs管理页面,http://localhost:8088 看到hadoop进程管理页面。
=============
编译运行:
1. Eclipse,
0) 日志问题 , core-site.xml hdfs-site.xml
1) Run AS--> Run Configuration. 在Java Application内选择WordCount ,
2) Arguments那里写 hdfs://localhost:9000//user/simope/myhome/input/ncdc/sample.txt hdfs://localhost:9000//user/simope/myhome/MaxTemperatureOutput
? cluster
2. Eclipse 导出jar
export jar is ok!
3. 命令打包jar
jar -cvf WordCount.jar ./WordCount*.class
结束任务:
hadoop job -list
hadoop job -kill job_201212111628_11166
结果查看:
hadoop fs -cat MaxTemperatureOutput/part-r-00000
==============
=============
安装HDFS(即格式化):
hadoop namenode -format
hadoop jar ./hadoop-examples-1.2.1.jar pi 10 100
==============
1.可以在http://localhost:50070 看到hdfs管理页面,http://localhost:8088 看到hadoop进程管理页面。
=============
编译运行:
1. Eclipse,
0) 日志问题 , core-site.xml hdfs-site.xml
1) Run AS--> Run Configuration. 在Java Application内选择WordCount ,
2) Arguments那里写 hdfs://localhost:9000//user/simope/myhome/input/ncdc/sample.txt hdfs://localhost:9000//user/simope/myhome/MaxTemperatureOutput
? cluster
2. Eclipse 导出jar
export jar is ok!
3. 命令打包jar
jar -cvf WordCount.jar ./WordCount*.class
结束任务:
hadoop job -list
hadoop job -kill job_201212111628_11166
结果查看:
hadoop fs -cat MaxTemperatureOutput/part-r-00000
==============