Tag: Nutch 配置 |
  • 1
预览模式: 普通 | 列表

Nutch 的配置文件

    Nutch 的配置文件几乎覆盖了Nutch 所有的功能。以前在网上看到过一个关于Nutch-default.XML  配置项解释,地址我没收藏,和本文配合起来看,会更好一些。这里我也不打算对其配置文件中的每一项做解释,如果在下面的解释里找不到想要的内容,请发表评论,我会回复的。

<property>
  <name>http.max.delays</name>
  <value>20</value>
  <description>The number of times a thread will delay when trying to
  fetch a page.  Each time it finds that a host is busy, it will wait
  fetcher.server.delay.  After http.max.delays attepts, it will give
  up on the page for now.</description>
</property>

爬虫的网络延时线程等待时间,以秒计时 , 默认的配时间是3秒,视网络状况而定。如果在爬虫运行的时候发现服务器返回了主机忙消息,则等待时间由fetcher.server.delay 决定,所以在网络状况不太好的情况下fetcher.server.delay 也设置稍大一点的值较好,此外还有一个http.timeout 也和网络状况有关系。

<property>
  <name>http.content.limit</name>
  <value>65536</value>
  <description>The length limit for downloaded content, in bytes.
  If this value is nonnegative (>=0), content longer than it will be truncated;
  otherwise, no truncation at all.
  </description>
</property>

查看更多...

Tags: Nutch 配置

北京线点科技 致力于以数据和搜索为核心的业务 (全文检索、舆情监控、搜索引擎产品)http://www.xd-tech.com

分类:搜索引擎 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 15587
  • 1