码迷,mamicode.com
首页 > 其他好文 > 详细

hadoop安装计

时间:2014-05-24 11:17:22      阅读:210      评论:0      收藏:0      [点我收藏+]

标签:style   class   blog   c   code   java   

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安装计

标签:style   class   blog   c   code   java   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!