1.下载
下载winghc/hadoop2x-eclipse-plugin 压缩包。
2.提取
提取到本地路径(如“C:\hadoop2x-eclipse-plugin”)。
3.搭建
在命令行窗口中打开'
C:\>cd C:\hadoop2x-eclipse-plugin\src\contrib\eclipse-plugin
运行ANT搭建
C:\hadoop2x-eclipse-plugin\src\contrib\eclipse-plugin>ant jar -Dversion=2.2.0 -Declipse.home=C:/IDE/sts-3.5.0 -Dhadoop.home=c:/hadoopBuildfile: C:\hadoop2x-eclipse-plugin\src\contrib\eclipse-plugin\build.xml
注意:下载“ivy-2.1.0.jar”需要有网络连接
4. 安装
在搭建成功之后,'\src\contrib\eclipse-plugin'.内会生成'hadoop-eclipse-plugin-2.2.0.jar' 。拷贝此jar文件并将其粘贴到你IDE的“插件”所在路径。
5. 配置
如果Eclipse是开启状态就重新启动。否则只要启动就可以了。
a. 进入Windows-->Open Perspective-->Other并选择“Map/Reduce”。
b. 点击“New Hadoop location...”(蓝色大象图标)并定义Hadoop路径来运行MapReduce应用程序。点击“Finish”按钮。
Map/Reduce(V2) Master:
Map/Reduce主节点地址(任务追踪器)
DFS Master:
分布式文件系统主节点地址(名称节点)。
要了解“Port”数量的话,就启动Hadoop并在浏览器中打开 localhost:8088/cluster。点击Tools --> Configuration 并查找以下属性。
DFS Master
Map/Reduce(V2) Master