首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 互联网 >

Nutch 1.0源代码分析(三): Fetch - 2

2012-09-05 
Nutch 1.0源代码分析(3): Fetch -- 2removedfor (int i 0 i threadCount i++) {// spawn threadsnew

Nutch 1.0源代码分析(3): Fetch -- 2
removed for (int i = 0; i < threadCount; i++) { // spawn threads new FetcherThread(getConf()).start(); }

從這個代碼裏看,好像抓取網頁的時候并沒有用到分布式任務來抓取
只是用在master這個主機上進行了抓取


for (int i = 0; i < threadCount; i++) { // spawn threads new FetcherThread(getConf()).start(); }

從這個代碼裏看,好像抓取網頁的時候并沒有用到分布式任務來抓取
只是用在master這個主機上進行了抓取



不是的,请看Fetch分析的第1篇,Fetch本身是用MapReduce写的,FetchThread是Fetch中的,所以抓取网页是分布式的。每台task node又是多线程的,是这样的关系

热点排行