首页 > 其他 > 详细

hadoop安装计

时间:2014-05-24 11:17:54      阅读:360      评论:0      收藏:0      [点我收藏+]
bubuko.com,布布扣
hadoop安装计

大体上按这个做就好了
http://blog.csdn.net/hitwengqi/article/details/8008203

需要修改hadoop-env.sh
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64
export PATH=$PATH:/usr/local/hadoop/bin

rm -r ~/playground/classes/* #删除编译后的文件
rm ~/playground/wordcount.jar #删除jar包
rm -r ~/output #删除wordcount产生的文档

#编译WordCount.java
javac -classpath /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.2.0.jar:/usr/local/hadoop/share/hadoop/common/hadoop-common-2.2.0.jar:/usr/local/hadoop/share/hadoop/common/lib/commons-cli-1.2.jar -d ~/playground/classes ~/playground/src/WordCount.java

#jar打包
# -C切换目录
jar -cvf ~/playground/wordcount.jar -C ~/playground/classes/ .

#hadoop执行命令
hadoop jar ~/playground/wordcount.jar home.goodspeed.playground.classes.org.apache.hadoop.WordCount ~/input ~/output
bubuko.com,布布扣

 

hadoop安装计,布布扣,bubuko.com

hadoop安装计

原文:http://www.cnblogs.com/goodspeed/p/3748444.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!