Hadoop Develop with Eclipse
目的
用eclipse編譯hadoop的src
環境
- sun-java6-jdk
- eclipse europa
- 工作目錄於 /home/waue/workspace
- 步驟二之後的動作於eclipse 設定
1. 用svn 下載最新的hadoop branch
*(以0.18為例)
$ svn co http://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.18/
2 將hadoop專案用ecilpse打開
file -> new -> project -> java project => next project name: brance-0.18 create project from existing source : /home/waue/workspace/branch-0.18 => finish
3 設定專案屬性
點選branch-0.18 右鍵 -> properties
3.1 properties -> builders
* import -> build.xml * 取消 java builder 的 勾 * branch-0.18 build.xml 打勾 * edit
3.1.1 edit的細部設定
- main (設定 buildfile路徑)
- classpath
- target (設定build時的方法,注意要點 set targets ...才能設定)
- 點 set targets ... 的設定畫面 (注意 order 的順序很重要,先compiler, 再 package)
3.2 properties -> java build path
* source -> default output folder : branch-0.18/build
3.3 properties -> java compiler
compiler level : 6.0
4 執行
- run
build.xml -> run as -> ant build
- run 完的畫面
- 可在 專案的build資料夾內看到編譯後的jar檔
Last modified 15 years ago
Last modified on Sep 18, 2009, 3:39:07 PM
Attachments (12)
- 2.png (59.9 KB) - added by waue 15 years ago.
- 3.1.png (45.6 KB) - added by waue 15 years ago.
- 3.1.1-1.png (60.1 KB) - added by waue 15 years ago.
- 3.1.1-2.png (86.3 KB) - added by waue 15 years ago.
- 3.1.1-3.png (56.1 KB) - added by waue 15 years ago.
- 3.1.1-3-1.png (51.8 KB) - added by waue 15 years ago.
- 3.2.png (73.0 KB) - added by waue 15 years ago.
- 3.3.png (79.9 KB) - added by waue 15 years ago.
- 3.4.png (51.3 KB) - added by waue 15 years ago.
- 4-1.png (128.6 KB) - added by waue 15 years ago.
- 4-2.png (102.6 KB) - added by waue 15 years ago.
- 4-3.png (29.7 KB) - added by waue 15 years ago.
Download all attachments as: .zip