Home > Database > Mysql Tutorial > fedora17中hadoop2.2.0在eclipse下运行wordcount

fedora17中hadoop2.2.0在eclipse下运行wordcount

WBOY
Release: 2016-06-07 15:12:58
Original
1205 people have browsed it

hadoop2.2.0的eclipse插件在http://download.csdn.net/detail/acm_er6/6964345 ,下载后直接拷贝到/usr/lib/eclipse/plugins/目录下然后重启eclipse后如果eclipse右边出现一头hadoop标志的小象即说明插件安装成功。然后窗口—首选项,选择Hadoop Map/Reduce

hadoop2.2.0的eclipse插件在http://download.csdn.net/detail/acm_er6/6964345 ,下载后直接拷贝到/usr/lib/eclipse/plugins/目录下然后重启eclipse后如果eclipse右边出现一头hadoop标志的小象即说明插件安装成功。然后窗口—>首选项,选择Hadoop Map/Reduce,然后在右侧输入Hadoop的安装路径即可。这样基本环境就搭建完毕。

建立wordcount工程,新建—>其他—>Map/Reduce Project,然后所需要的Jar包会被自动加入到工程中,然后就像一般的Java工程一样,新建一个WordCount类,将Hadoop的WordCount文件的内容拷贝过来,点击运行配置—>自变量,然后在程序自变量中输入/home/XXX/in(此目录运行前建好)  /home/XXX/out(此目录不用新建,运行后程序后自动生成),将需要处理的文件放在此处就可以了。也就是说直接在程序变量中输入:

/home/XXX/in /home/XXX/out

在VM变量中输入:

-Xms512m -Xmx1024m -XX:MaxPermSize=256m

设置虚拟机堆栈。

这样选择Run on Hadoop即可!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template