洛阳建设工程信息网站,cad做彩图那个网站应用好用,电子商务网站建设功能,广州企业公司大全在上一篇的基础上。 1准备环境#xff1a;hadoop集群、java、mysql数据库#xff0c;代码可以在eclipse中运行#xff0c;可以单机模式下插入数据到mysql数据库。2修改配置文件nutch-site.xml#xff1a;propertynameplugin.folders/namevalue…在上一篇的基础上。 1准备环境hadoop集群、java、mysql数据库代码可以在eclipse中运行可以单机模式下插入数据到mysql数据库。 2修改配置文件nutch-site.xml property nameplugin.folders/name value./plugins/value descriptionDirectories where nutch plugins are located. Each element may be a relative or absolute path. If absolute, it is used as is. If relative, it is searched for on the classpath./description /property 在eclipse中选中buil.xmlrun as ant运行runtime运行成功会产生文件夹runtime。 3 把runtime文件夹上传到hadoop集群中的master服务器没有验证其他服务器是不是可以我上传之后的位置是:/home/hadoop/nutch/runtime设置环境变量 在/etc/profile中export NUTCH_HOME/home/hadoop/nutch/runtime/local source /etc/profile使得修改起作用。 4应该是把url种子文件上传到hadoop。我的种子文件始终没有成功这一步略过。 5在/home/hadoop/nutch/runtime/deploy目录下运行./bin/nutch crawl -dir crawl -depth 2 -threads 4 -topN 50一点心得nutch2之后不需要把配置文件conf分发到集群中的每台机器但是修改配置文件以后需要重新用ant打包配置才能生效。