前提条件:
*.有 java jdk1.6以上版本
*.部署hadoop 2.6.0
*.安装 eclipse 到路径 /usr/local/eclipse/eclipse
1.安装ant:wget http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.4-bin.tar.gz
2.打开profile 文件:sudo gedit /etc/profile 设置 ANT_HOME 和path
3.下载hadoop2.2.0 版本eclipse插件
$ cd Desktop
$ wget https://github.com/winghc/hadoop2x-eclipse-plugin/archive/master.zip
(百度云盘:http://pan.baidu.com/s/1ntupfnV 提取码:7nsd)
$unzip master
4. 解压后进入目录
$ cd hadoop2x-eclipse-plugin-master/src/contrib/eclipse-plugin
5. 用 ant compile