nutch-site.xml 配置详解



nutch-site.xml 配置详解。

“Peter Wang/Nutch-0.9 (Nutch spiderman; http://peterpuwang.googlepages.com ; MyEmail)”
上述内容是在apache访问日志中截取到的nutch抓取网站的访问信息。
从上面的内容我们可以看到在nutch/conf/nutch-site.xml文件各项配置的含义。
并且可以看到,其实各配置项的description并没有显示在被抓取网站的日志中。
1,http.agent.name=Peter Wang
2,http.agent.description=Nutch spiderman
3,http.agent.url=http://peterpuwang.googlepages.com
4,http.agent.email=MyEmail
针对各项配置,结合日志访问的实际结果,大家应该知道该怎么配置这个文件了吧。
注意,如果不配置ttp.agent.name项的话,会报错,无法启动。
Edit the file conf/nutch-site.xml. insert at minimum following properties into it and edit in proper values for the properties:
<?xml version=”1.0″?>
<?xml-stylesheet type=”text/xsl” href=”configuration.xsl”?>
<!– Put site-specific property overrides in this file. –>
<configuration>
<property>
<name>http.agent.name</name>
<value>Peter Wang</value>
<description>Peter Pu Wang
</description>
</property>
<property>
<name>http.agent.description</name>
<value>Nutch spiderman</value>
<description> Nutch spiderman
</description>
</property>
<property>
<name>http.agent.url</name>
<value>http://peterpuwang.googlepages.com </value>
<description>http://peterpuwang.googlepages.com
</description>
</property>
<property>
<name>http.agent.email</name>
<value>MyEmail</value>
<description>peterpuwang@yahoo.com
</description>
</property>
</configuration>