eclipse下开发hadoop有个hadoop2x-eclipse-plugin插件,可以帮助我们在hadoop集群上运行调试我们的程序,其项目地址为https://github.com/winghc/hadoop2x-eclipse-plugin。
我下载源码包后发现其release包中只有hadoop 2.6的,我本机的环境是hadoop 2.7.1 所以需要自己编译
环境准备
其官方的编译指导文件描述如下
How to build
[hdpusr@demo hadoop2x-eclipse-plugin]$ cd src/contrib/eclipse-plugin
# Assume hadoop installation directory is /usr/share/hadoop
[hdpusr@apclt eclipse-plugin]$ ant jar -Dversion=2.4.1 -Dhadoop.version=2.4.1 -Declipse.home=/opt/eclipse -Dhadoop.home=/usr/share/hadoop
final jar will be generated at directory
${hadoop2x-eclipse-plugin}/build/contrib/eclipse-plugin