Hadoop搭建总结

来源:互联网 发布:热血江湖怪物数据 2017 编辑:程序博客网 时间:2024/04/30 05:34
对于伪分布式的搭建,没啥好说的,推荐两个博客:
http://blog.csdn.net/liu_jason/article/details/7707458
http://wliufu.iteye.com/blog/1852281
第一个主要讲在cygwin下的搭建,第二个讲在cygwin下怎么用eclipse创建hadoop开发环境

至于全分布式,就伤心咯。。。搞了三台虚拟机在跑,结果感觉还是没有成功
参照这个博客弄的:
http://blog.csdn.net/licongcong_0224/article/details/12972889
三个虚拟机在跑,卡死人,单机跑的时候是可以的,但是加入了几个datanode后总感觉不大对劲,虽然还是能跑,但是感觉只有一台在跑。。。。
用bin/hdfs dfsadmin-report查看的时候总是只能看到只有一个datanode,但是在slaves上看datanode已经启动成功了,不知道为什么。。。。

打包命令是jar -cvf matrix.jar 一大堆.class文件 或者  jar-cvf matrix.jar -C 你要打包的文件夹
这个包得放到hadoop默认jar包的路径之下,不然会报错误说
no job jar file set. user classes may nojot be found. seejobconf(class) or bconf#setjar(string)

还有一个解决方法说
I've had this error aswell when running from the command prompt. I've found that bypassing the location of the jar file that contains your classes toconf.setJar() when setting the job configuration parameters fixesit. Basically the code would look something likethis: 

String userJarLocation= "/path/to/jar"; 
conf.setJar(userJarLocation); //were conf isthe JobConf object

来自:http://hadoop.6.n7.nabble.com/Getting-quot-No-job-jar-file-set-User-classes-may-not-be-found-quot-error-when-running-a-map-reduce-7-td3596.html
不过我没试过,虽然觉得应该可行,急着交作业了,上面那个方法能用就先这样吧,有机会再试试。。。。

还有一篇文章分析了原因:
http://blog.csdn.net/andyelvis/article/details/7706205
这篇文章的第4点,不明觉厉。。。。

想想好像没啥好说的了,要是想到了或者以后再搞hadoop的时候再补充吧,先洗澡去。。。。。
0 0