我在单机上有nutch 2.x和hadoop 1.2.1。
我配置seed.txt、conf/regex-urlfilter.txt并运行命令
crawl urls/seed.txt TestCrawl http://localhost:8088/solr/ 2
然后我想更改conf/regex-urlfilter.txt 中的规则
我在两个文件中更改了它:
~$ find . -name 'regex-urlfilter.txt'
./webcrawer/apache-nutch-2.2.1/conf/regex-urlfilter.txt
./webcrawer/apache-nutch-2.2.1/runtime/local/conf/regex-urlfilter.txt
然后我运行
crawl urls/seed.txt TestCrawl2 http://localhost:8088/solr/ 2
但是regex-urlfilter.txt中的更改不会影响。
Hadoop报告它使用文件。
cat /home/hadoop/data/hadoop-unjar6761544045585295068/regex-urlfilter.txt
当我看到文件的内容时,我看到旧文件
如何强制hadoop使用新配置?
此设置存储在arhive文件中
/home/hadoop/webcrawer/apache-nutch-2.2.1/build/apache-nutch-2.2.1.job
运行
ant clean
ant runtime
将其替换为新设置或编辑arhive文件/home/hadoop/webcrawer/apache-nutch-2.2.1/build/apache-nutch-2.2.1.job