Version 13 (modified by jazz, 15 years ago) (diff) |
---|
hadoop4win
-- Hadoop for Windows using Cygwin
軟體簡介
hadoop4win,顧名思義為『Hadoop for Windows』,主要是提供 Windows 平台上簡易安裝 Hadoop 的批次安裝檔。此批次安裝檔內容,主要參考自國網中心企鵝龍與再生龍團隊成員孫振凱先生之 drbl-winroll 作品,抽取安裝部分程式改寫成 hadoop4win 所需的步驟。
hadoop4win 目前包含三大軟體組成:
- Cygwin - 提供精簡版,類似 Linux 的環境
- JDK 1.6.0 update 18 - 運行 Hadoop 必須的 JRE(Java Runtime Environment) 與編譯程式所需之 javac 編譯器
- Hadoop 0.20.1 - 包含 Hadoop 0.20.1 原始程式與中英文說明文件檔
檔案下載
改版紀錄
0.1 alpha 2010/01/22 基於 drbl-winroll 修改為 hadoop4win 嚐鮮版
意見回覆
安裝方法
- STEP 1 : 首先下載 hadoop4win 任一版本,並存至硬碟(如 D:)。使用 Windows XP 以上版本內建的解壓縮工具將 zip 壓縮檔解開。
- STEP 2 : 在 hadoop4win-setup 目錄中,執行 hadoop4win-setup.bat 批次檔。
- STEP 3 : 一開始會出現 Cygwin 的安裝畫面,按『下一步(N)』開始安裝。
- 接著批次程式將會把 Hadoop 單機版所需之 Java 開發環境 (JDK 1.6.0 update 18)與 Hadoop 0.20.1 壓縮檔拷貝至安裝目錄。若您下載的是網路安裝版本,會看到批次檔先從網路上下載兩個壓縮檔,才開始安裝。
- STEP 4 : 當拷貝完成後會進入 Cygwin 視窗。此時,請輸入指令『hadoop4win-init』。
$ hadoop4win-init
- 此初始化指令將會進行 JDK 與 Hadoop 解壓縮動作
- 最後將會執行 Hadoop Namenode 的格式化
- STEP 5 : 按下任意鍵會依序啟動 Hadoop Name Node, Data Node, Job Tracker, Task Tracker
- 並使用預設瀏覽器依序開啟 http://localhost:50030 與 http://localhost:50070 (若使用 IE 可能會只看到一個畫面)
測試方法
- STEP 6 : 此時系統已完成 Hadoop 0.20.1 的 tar ball 安裝,可以參考 國網中心雲端運算課程(一) 之教學進行相關測試。目前將 Hadoop 0.20.1 安裝於 /opt/hadoop 路徑下,故使用者必須先切換至該目錄才能進行相關指令操作。
$ cd /opt/hadoop
- STEP 7 : 練習 HDFS 指令: 『bin/hadoop fs -put <local file/dir> <HDFS file/dir>』
$ bin/hadoop fs -input conf-org input
- STEP 8 : 練習 HDFS 指令: 『bin/hadoop fs -lsr <HDFS file/dir>』
$ bin/hadoop fs -lsr
- STEP 9 : 練習 MapReduce 丟 Job 指令: 『bin/hadoop jar <local jar file> <class name> <parameters>』
$ bin/hadoop jar hadoop-0.20.1-examples.jar wordcount input output
- STEP 10 : 練習從 http://localhost:50030 查看目前 MapReduce Job 的運作情形
- STEP 11 : 欲離開 Cygwin 環境前或者要暫時關閉 Hadoop 系統時,請輸入指令『stop-hadoop』。
$ stop-hadoop
- STEP 12 : 欲重新啟動 Hadoop 系統時,請輸入指令『start-hadoop』。
$ start-hadoop
已知問題
- [備註] 由於 Hadoop 0.20.1 的 HDFS 檢查比較嚴謹,因此單機狀態下,您會看到 http://localhost:50070 顯示『Safe Mode is ON』等字樣,代表 HDFS 目前是被封鎖住寫入權限,需等待至少 30 秒以後才會恢復正常。亦因此,http://localhost:50030 若剛開始沒有 Task Tracker 連上來,也是因為 HDFS 處於安全模式(Safe Mode)造成,須等 30 秒後切回正常模式才會連上。
- [備註] 若需要重新啟動 Cygwin 環境,請至 C:\hadoop4win 目錄執行 cygwin.bat 批次檔
Attachments (49)
- hadoop4win_01.jpg (278.7 KB) - added by jazz 15 years ago.
- hadoop4win_02.jpg (116.5 KB) - added by jazz 15 years ago.
- hadoop4win_03.jpg (55.6 KB) - added by jazz 15 years ago.
- hadoop4win_05.jpg (119.4 KB) - added by jazz 15 years ago.
- hadoop4win_06.jpg (180.8 KB) - added by jazz 15 years ago.
- hadoop4win_07.jpg (196.7 KB) - added by jazz 15 years ago.
- hadoop4win_08.jpg (208.6 KB) - added by jazz 15 years ago.
- hadoop4win_09.jpg (205.0 KB) - added by jazz 15 years ago.
- hadoop4win_10.jpg (234.8 KB) - added by jazz 15 years ago.
- hadoop4win_11.jpg (277.5 KB) - added by jazz 15 years ago.
- hadoop4win_12.jpg (176.9 KB) - added by jazz 15 years ago.
- hadoop4win_13.jpg (158.6 KB) - added by jazz 15 years ago.
- hadoop4win_14.jpg (161.8 KB) - added by jazz 15 years ago.
- hadoop4win_15.jpg (291.6 KB) - added by jazz 15 years ago.
- hadoop4win_16.jpg (195.2 KB) - added by jazz 15 years ago.
- hadoop4win_17.jpg (125.2 KB) - added by jazz 15 years ago.
- hadoop4win_18.jpg (247.0 KB) - added by jazz 15 years ago.
- hadoop4win_04.jpg (192.9 KB) - added by jazz 15 years ago.
- hadoop4win_19.jpg (193.4 KB) - added by jazz 15 years ago.
- hadoop4win_20.jpg (71.5 KB) - added by jazz 15 years ago.
- hadoop4win_21.jpg (84.5 KB) - added by jazz 15 years ago.
- hadoop4win_22.jpg (122.0 KB) - added by jazz 15 years ago.
- hadoop4win_23.jpg (117.9 KB) - added by jazz 15 years ago.
- hadoop4win_24.jpg (94.7 KB) - added by jazz 15 years ago.
- hadoop4win_25.jpg (124.2 KB) - added by jazz 15 years ago.
- hadoop4win_26.jpg (57.6 KB) - added by jazz 15 years ago.
- hadoop4win_27.jpg (84.3 KB) - added by jazz 15 years ago.
- hadoop4win_28.jpg (95.2 KB) - added by jazz 15 years ago.
- hadoop4win-installer_01.jpg (31.6 KB) - added by jazz 14 years ago.
- hadoop4win-installer_02.jpg (111.4 KB) - added by jazz 14 years ago.
- hadoop4win-installer_03.jpg (101.9 KB) - added by jazz 14 years ago.
- hadoop4win-installer_04.jpg (98.0 KB) - added by jazz 14 years ago.
- hadoop4win-installer_05.jpg (101.9 KB) - added by jazz 14 years ago.
- hadoop4win-installer_06.jpg (65.7 KB) - added by jazz 14 years ago.
- hadoop4win-installer_06_1.jpg (75.3 KB) - added by jazz 14 years ago.
- hadoop4win-installer_06_2.jpg (76.4 KB) - added by jazz 14 years ago.
- hadoop4win-installer_07.jpg (68.3 KB) - added by jazz 14 years ago.
- hadoop4win-installer_08.jpg (97.4 KB) - added by jazz 14 years ago.
- hadoop4win-installer_09.jpg (61.7 KB) - added by jazz 14 years ago.
- hadoop4win-installer_10.jpg (140.8 KB) - added by jazz 14 years ago.
- hadoop4win-installer_11.jpg (31.3 KB) - added by jazz 14 years ago.
- hadoop4win-uninstall_01.jpg (77.2 KB) - added by jazz 14 years ago.
- hadoop4win-uninstall_02.jpg (73.8 KB) - added by jazz 14 years ago.
- hadoop4win-uninstall_03.jpg (142.0 KB) - added by jazz 14 years ago.
- hadoop4win_29.jpg (88.5 KB) - added by jazz 13 years ago.
- hadoop4win_30.jpg (414.0 KB) - added by jazz 13 years ago.
- hadoop4win_31.jpg (172.8 KB) - added by jazz 13 years ago.
- hadoop4win_32.jpg (142.3 KB) - added by jazz 13 years ago.
- 12-04-15_hadoop4win_1.5_en.PNG (28.5 KB) - added by jazz 12 years ago.