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

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又是多线程的,是这样的关系