close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.7/dist-packages/libsvn/_repos.so: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
Mar 16, 2011, 8:02:54 PM (15 years ago)
- Author:
-
jazz
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v14
|
v15
|
|
| 66 | 66 | == 步驟四:使用 !KarmaSphere Studio 建立 !WordCount 專案 == |
| 67 | 67 | |
| 68 | | * 底下示範 !KarmaSphere Studio 能給初學者判斷 Key-Value Pair 與 InputFormat 的幫助。 |
| | 68 | * 底下示範 !KarmaSphere Studio 能給初學者判斷 Key-Value Pair 與 !InputFormat 的幫助。 |
| 69 | 69 | * 首先,到「檔案(F)」選單,選擇「New Project...」 |
| 70 | 70 | * [[Image(NCHCCloudCourse100928/Netbeans:KarmaSphere_WordCount_01.png,width=600)]] |
| 71 | 71 | * 在左方 Categories 選擇「Java」,並在右方 Projects 選擇「Java Application」 |
| 72 | 72 | * [[Image(NCHCCloudCourse100928/Netbeans:KarmaSphere_WordCount_02.png,width=600)]] |
| 73 | | * 於 Project Name 處,輸入「WordCountTest」,並按下方「完成」按鈕 |
| | 73 | * 於 Project Name 處,輸入「!WordCountTest」,並按下方「完成」按鈕 |
| 74 | 74 | * [[Image(NCHCCloudCourse100928/Netbeans:KarmaSphere_WordCount_03.png,width=600)]] |
| 75 | 75 | * 於左方「程式庫」上,按下滑鼠右鍵,選擇「Add Library ...」 |
| … |
… |
|
| 77 | 77 | * 依照需要選擇 Hadoop !MapReduce 版本,例如:「Hadoop !MapReduce 0.20」 |
| 78 | 78 | * [[Image(NCHCCloudCourse100928/Netbeans:KarmaSphere_WordCount_05.png)]] |
| 79 | | * [[Image(NCHCCloudCourse100928/Netbeans:KarmaSphere_WordCount_06.png,width=600)]] |
| | 79 | * 按下「加入程式庫」按鈕後,左方程式庫 會加入許多與 Hadoop 相關的 JAR 函式庫。 |
| | 80 | * [[Image(NCHCCloudCourse100928/Netbeans:KarmaSphere_WordCount_06.png)]] |
| | 81 | * 到「原始碼套件」上,按下滑鼠右鍵,選擇「New」->「Other...」 |
| 80 | 82 | * [[Image(NCHCCloudCourse100928/Netbeans:KarmaSphere_WordCount_07.png,width=600)]] |
| | 83 | * 於 Project 處輸入「!WordCountTest」,左方 Categories 選擇「Hadoop !MapReduce Components」,右方 File Types 選擇「Hadoop Map-Reduce Job (Stable API)」,並且按下「下一步」按鈕繼續。 |
| 81 | 84 | * [[Image(NCHCCloudCourse100928/Netbeans:KarmaSphere_WordCount_08.png,width=600)]] |
| | 85 | * 於 Class Name 處輸入「!WordCountJob」,而 package 處選擇「wordcounttest」,最後按下「完成」按鈕。 |
| 82 | 86 | * [[Image(NCHCCloudCourse100928/Netbeans:KarmaSphere_WordCount_09.png,width=600)]] |
| | 87 | * 在 Netbean 畫面中會出現額外的 Workflow 圖形介面。您可以選擇某個檔案當 Input File,例如:hadoop/conf/core-site.xml 這個 XML 檔案。 |
| 83 | 88 | * [[Image(NCHCCloudCourse100928/Netbeans:KarmaSphere_WordCount_10.png,width=600)]] |
| | 89 | * 接著,請嘗試修改 !InputFormat 的 Class Name 並觀察底下 Key-Value 的差異,例如:!TextInputFormat 與 !KeyValueInputFormat 有何不同。 |
| 84 | 90 | * [[Image(NCHCCloudCourse100928/Netbeans:KarmaSphere_WordCount_11.png,width=600)]] |
| 85 | 91 | |