Nutch 2.0和Hadoop。如何防止conf / regex-urlfilter.txt的缓存

时间:2013-12-12 18:52:36

标签: hadoop nutch

我在单机上有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中的规则

我在2个文件中更改了它:

~$ 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使用新配置?

1 个答案:

答案 0 :(得分:0)

此设置存储在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

相关问题