1

我正在尝试配置 nutch 以运行多线程爬行。

但是,我面临一个问题。我无法使用多个线程运行爬网,我已将 nutch-site.xml 修改为使用 25 个线程,但我仍然只能看到 1 个线程在运行。

<property>
  <name>fetcher.threads.fetch</name>
  <value>25</value>
  <description>The number of FetcherThreads the fetcher should use.
    This is also determines the maximum number of requests that are 
    made at once (each FetcherThread handles one connection).</description>
</property>

<property>
  <name>fetcher.threads.per.host</name>
  <value>25</value>
  <description>This number is the maximum number of threads that
    should be allowed to access a host at one time.</description>
</property>

我总是得到 activeThreads=25, spinWaiting=24, fetchQueues.totalSize=some value 的值。

这是什么意思,请您解释一下是什么问题以及如何解决。

我将非常感谢您的帮助。

谢谢, 苏米特

4

1 回答 1

2

我认为您的问题与带有新 Nutch fetcher 的已知错误有关。见NUTCH-721

您可以尝试使用 OldFetcher(如果您有 Nutch 1.0)来查看是否可以解决您的问题。

——肯

于 2009-06-14T19:01:18.820 回答