close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.7/dist-packages/libsvn/_delta.so: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
Jul 11, 2008, 5:23:11 PM (17 years ago)
- Author:
-
waue
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v17
|
v18
|
|
18 | 18 | == 1.3 Hadoop == |
19 | 19 | |
20 | | 談到Hadoop就不得不提到Lucene和Nutch。首先,Lucene並不是一個應用程序,而是提供了一個純Java的高性能全文索引引擎工具包,它可以方便的嵌入到各種實際應用中實現全文搜索/索引功能。Nutch是一個應用程序,是一個以Lucene為基礎實現的搜索引擎應用,Lucene 為Nutch提供了文本搜索和索引的API,Nutch不光有搜索的功能,還有數據抓取的功能。在nutch0.8.0版本之前,Hadoop還屬於 Nutch的一部分,而從nutch0.8.0開始,將其中實現的NDFS和MapReduce剝離出來成立一個新的開源項目,這就是Hadoop,而 nutch0.8.0版本較之以前的Nutch在架構上有了根本性的變化,那就是完全構建在Hadoop的基礎之上了。在Hadoop中實現了 Google的GFS和MapReduce算法,使Hadoop成為了一個分佈式的計算平台。[[BR]] |
| 20 | 談到Hadoop就不得不提到Lucene和Nutch。首先,Lucene並不是一個應用程序,而是提供了一個純Java的高性能全文索引引擎工具包,它可以方便的嵌入到各種實際應用中實現全文搜索/索引功能。Nutch是一個應用程序,是一個以Lucene為基礎實現的搜索引擎應用,Lucene 為Nutch提供了文本搜索和索引的API,Nutch不光有搜索的功能,還有數據抓取的功能。在nutch0.8.0版本之前,Hadoop還屬於 Nutch的一部分,而從nutch0.8.0開始,將其中實現的NDFS和!MapReduce剝離出來成立一個新的開源項目,這就是Hadoop,而 nutch0.8.0版本較之以前的Nutch在架構上有了根本性的變化,那就是完全構建在Hadoop的基礎之上了。在Hadoop中實現了 Google的GFS和!MapReduce算法,使Hadoop成為了一個分佈式的計算平台。[[BR]] |
21 | 21 | 其實,Hadoop並不僅僅是一個用於存儲的分佈式文件系統,而是設計用來在由通用計算設備組成的大型集群上執行分佈式應用的框架。[[BR]] |
22 | 22 | |
… |
… |
|
26 | 26 | HDFS 具有高容錯性,並且可以被部署在低價的硬件設備之上。HDFS很適合那些有大數據集的應用,並且提供了對數據讀寫的高吞吐率。HDFS是一個 master/slave的結構,就通常的部署來說,在master上只運行一個Namenode,而在每一個slave上運行一個Datanode。[[BR]] |
27 | 27 | HDFS 支持傳統的層次文件組織結構,同現有的一些文件系統在操作上很類似,比如你可以創建和刪除一個文件,把一個文件從一個目錄移到另一個目錄,重命名等等操作。Namenode管理著整個分佈式文件系統,對文件系統的操作(如建立、刪除文件和文件夾)都是通過Namenode來控制。 |
28 | | * MapReduce的實現 |
29 | | MapReduce是Google 的一項重要技術,它是一個編程模型,用以進行大數據量的計算。對於大數據量的計算,通常採用的處理手法就是並行計算。至少現階段而言,對許多開發人員來說,並行計算還是一個比較遙遠的東西。MapReduce就是一種簡化並行計算的編程模型,它讓那些沒有多少並行計算經驗的開發人員也可以開發並行應用。[[BR]] |
30 | | MapReduce的名字源於這個模型中的兩項核心操作:Map和 Reduce。也許熟悉Functional Programming(函數式編程)的人見到這兩個詞會倍感親切。簡單的說來,Map是把一組數據一對一的映射為另外的一組數據,其映射的規則由一個函數來指定,比如對[1, 2, 3, 4]進行乘2的映射就變成了[2, 4, 6, 8]。Reduce是對一組數據進行歸約,這個歸約的規則由一個函數指定,比如對[1, 2, 3, 4]進行求和的歸約得到結果是10,而對它進行求積的歸約結果是24。 |
| 28 | * !MapReduce的實現 |
| 29 | !MapReduce是Google 的一項重要技術,它是一個編程模型,用以進行大數據量的計算。對於大數據量的計算,通常採用的處理手法就是並行計算。至少現階段而言,對許多開發人員來說,並行計算還是一個比較遙遠的東西。!MapReduce就是一種簡化並行計算的編程模型,它讓那些沒有多少並行計算經驗的開發人員也可以開發並行應用。[[BR]] |
| 30 | !MapReduce的名字源於這個模型中的兩項核心操作:Map和 Reduce。也許熟悉Functional Programming(函數式編程)的人見到這兩個詞會倍感親切。簡單的說來,Map是把一組數據一對一的映射為另外的一組數據,其映射的規則由一個函數來指定,比如對[1, 2, 3, 4]進行乘2的映射就變成了[2, 4, 6, 8]。Reduce是對一組數據進行歸約,這個歸約的規則由一個函數指定,比如對[1, 2, 3, 4]進行求和的歸約得到結果是10,而對它進行求積的歸約結果是24。 |
31 | 31 | [http://www.cnblogs.com/wayne1017/archive/2007/03/18/668768.html copied from Hadoop學習筆記一簡要介紹] |
32 | 32 | |
… |
… |
|
179 | 179 | = 四、效能測試 = |
180 | 180 | = 五、開發程式 = |
181 | | == 5.1 install IBM mapReduce tool == |
182 | | 1. Download the IBM MapReduce Tools zip file and extract to /tmp/. [[br]] |
| 181 | == 5.1 install IBM !MapReduce tool == |
| 182 | 1. Download the IBM !MapReduce Tools zip file and extract to /tmp/. [[br]] |
183 | 183 | 2. Make sure Eclipse is closed and ... [[br]] |
184 | 184 | {{{ |
… |
… |
|
188 | 188 | }}} |
189 | 189 | 3. Restart Eclipse [[br]] |
190 | | Check IBM MapReduce Tools plugin installing well [[br]] |
| 190 | Check IBM !MapReduce Tools plugin installing well [[br]] |
191 | 191 | {{{ |
192 | 192 | Eclipse |
… |
… |
|
227 | 227 | * the sample code is here |
228 | 228 | |
229 | | [http://trac.nchc.org.tw/cloud/attachment/wiki/hadoop-sample-code/WordCount.java] |
230 | | |
231 | | * paste the contents to your new adding file “WordCount.java” |
| 229 | [http://trac.nchc.org.tw/cloud/attachment/wiki/hadoop-sample-code/!WordCount.java] |
| 230 | |
| 231 | * paste the contents to your new adding file “!WordCount.java” |
232 | 232 | === 5.3.2. Connect to Hadoop File System === |
233 | 233 | |
234 | | * Enable the MapReduce servers window |
| 234 | * Enable the !MapReduce servers window |
235 | 235 | {{{ |
236 | 236 | Eclipse |
… |
… |
|
238 | 238 | }}} |
239 | 239 | |
240 | | * At the bottom of your window, you should have a "MapReduce Servers" tab. |
| 240 | * At the bottom of your window, you should have a "!MapReduce Servers" tab. |
241 | 241 | |
242 | 242 | If not, see second bullet above. Switch to that tab. |
… |
… |
|
286 | 286 | an existing server from the list below > finish |
287 | 287 | }}} |
288 | | * A “console” tag will show beside “MapReduce Server” tag. |
| 288 | * A “console” tag will show beside “!MapReduce Server” tag. |
289 | 289 | |
290 | 290 | * While Map Reduce is running, you can visit http://localhost:50030/ to |