close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.7/dist-packages/libsvn/_core.so: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
Jul 21, 2011, 12:05:15 PM (14 years ago)
- Author:
-
waue
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v10
|
v11
|
|
| 12 | 12 | |
| 13 | 13 | = 說明 = |
| | 14 | |
| 14 | 15 | {{{ |
| 15 | 16 | #!text |
| … |
… |
|
| 97 | 98 | job.setJarByClass(HelloHadoop.class); |
| 98 | 99 | // 設定輸入路徑 |
| 99 | | FileInputFormat.setInputPaths(job, "/user/hadoop/input"); |
| | 100 | FileInputFormat.setInputPaths(job, "");// 請輸入正確的輸入資料夾 |
| 100 | 101 | // 設定輸出路徑 |
| 101 | | FileOutputFormat.setOutputPath(job, new Path("/user/hadoop/output-hh1")); |
| | 102 | FileOutputFormat.setOutputPath(job, new Path("")); // 請輸入正確的輸出資料夾 |
| 102 | 103 | // 指定定map class |
| 103 | 104 | job.setMapperClass(HelloMapper.class); |
| … |
… |
|
| 113 | 114 | |
| 114 | 115 | |
| 115 | | * 最後請看結果檔: /user/hadoop/output-hh1/part-r-00000 |
| | 116 | * 最後請呈現結果檔, 如: /user/hadoop/output-hh1/part-r-00000 |
| | 117 | |
| | 118 | [http://trac.nchc.org.tw/cloud/wiki/NCHCCloudCourse100928_4_EXM_sol 解答] |