下载: hadoop2x-eclipse-pluginjava
Hadoop-2.5.2和hadoop-2.6.4版本选择hadoop-eclipse-plugin-2.6.0.jar(亲测可用)
将hadoop-eclipse-plugin-2.6.0.jar拷贝到eclipse\plugins下
重启eclipsegit
eclipse.exe -cleangithub
这时,在eclipse Project Explorer视图下,能看到,多出了DFS Locations apache
Windows -> Preferences windows
Windows -> Perspective -> Open Perspective -> Other… 选中 Map/Reduce eclipse
进入Map/Reduce视图,新建 Hadoop location… oop
设置集群地址 测试
下载64位的hadoop2.6版本插件,放在某一目录的bin目录下(必定要为bin目录) spa
下载: hadoop2.6-x64.net
将其中的hadoop.dll 拷贝至 C:\Windows\System32目录下
新建MapReduce工程
将集群中hadoop-2.6.4/etc/hadoop下的配置文件拷贝到工程下
利用hadoop-wiki例子:WordCount
测试:
代码添加设置系统属性”hadoop.home.dir”,value值为第三步设置bin目录的父目录。
System.setProperty("hadoop.home.dir", "D:\\hadoop\\hadoop2.6-x64" );