wiki:waue/2009/0904

Version 3 (modified by waue, 15 years ago) (diff)

--

Hadoop Develop

目的

用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的細部設定

3.2 properties -> java build path

 * source -> default output folder : branch-0.18/build

3.3 properties -> java compiler

compiler level : 6.0 

4 執行

 build.xml -> run as -> ant build 
  • 可在 專案的build資料夾內看到編譯後的jar檔

Attachments (12)

Download all attachments as: .zip