Version 1 (modified by waue, 15 years ago) (diff) |
---|
編譯 hadoop 0.20.1 的 eclipse plugin
Eclipse 3.3 3.4 3.5 適用
前言
- 從 hadoop 0.20.1 之後,contrib 資料夾下就在也找不到 eclipse-plugin 可以用了,因為作者群認為大家不是小孩子了,要自己種出東西來吃,而不是伸手要來之後又一直抱怨有瑕疵...(在這之前一直抱怨有瑕疵的就是我)。
- 此篇可以幫助大家編譯出適用於 hadoop 0.20 的 各版本 eclipse plugin (hadoop-0.20.1-eclipse-plugin.jar)出來
安裝
- 安裝 hadoop-0.20.1 於 /nfs/opt 目錄下
- 安裝 eclipse 各版本套件於 /nfs/opt 目錄底下
設定 Eclipse
編譯的過程中
Eclipse 3.3
為預設值免設定此步驟
Eclipse 3.4
- 需要改 /nfs/opt/hadoop-0.20.1/src/contrib/build-contrib.xml
<property name="eclipse.home" location="/nfs/opt/eclipse34/"/>
- 修改 /nfs/opt/hadoop-0.20.1/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/launch/HadoopApplicationLaunchShortcut.java
import org.eclipse.jdt.debug.ui.launchConfigurations.JavaApplicationLaunchShortcut; //import org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationLaunchShortcut;
Eclipse 3.5
- 需要改/nfs/opt/hadoop-0.20.1/src/contrib/build-contrib.xml
<property name="eclipse.home" location="/nfs/opt/eclipse35/"/>
- 修改 /nfs/opt/hadoop-0.20.1/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/launch/HadoopApplicationLaunchShortcut.java
import org.eclipse.jdt.debug.ui.launchConfigurations.JavaApplicationLaunchShortcut; //import org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationLaunchShortcut;
編譯與封裝
$ cd /nfs/opt/hadoop-0.20.1/ $ ant compile $ ln -sf /nfs/opt/hadoop-0.20.1/docs /nfs/opt/hadoop-0.20.1/build/docs $ ant package
如果沒有出錯的話,檔案出現在 /nfs/opt/hadoop-0.20.1/build/contrib/eclipse-plugin/hadoop-0.20.2-dev-eclipse-plugin.jar
將這個檔案(看要不要改名成 hadoop-0.20.1-eclipse-plugin.jar 皆可)放到你的 /nfs/opt/eclipse/plugin 內就可以囉!
Attachments (7)
- 1.png (158.1 KB) - added by waue 15 years ago.
- 2.png (27.9 KB) - added by waue 15 years ago.
- 3.png (226.1 KB) - added by waue 15 years ago.
- 5.png (43.8 KB) - added by waue 15 years ago.
- hadoop-0.20.1-eclipse-3.3-plugin.jar (2.8 MB) - added by waue 15 years ago.
- hadoop-0.20.1-eclipse-3.4-plugin.jar (2.8 MB) - added by waue 15 years ago.
- hadoop-0.20.1-eclipse-3.5-plugin.jar (2.8 MB) - added by waue 15 years ago.