关于heritrix FrontierScheduler扩展配置

关于heritrix FrontierScheduler扩展配置

两种方式:
1.在扩展FrontierScheduler java工程中src目录下建立modules目录,并在目录下增加Processor.options文件
该文件内容为:com.lv.crawler.LvScheduler|LvScheduler ,其中com.lv.crawler.LvScheduler是继承自FrontierScheduler
最后打包成jar文件,放到heritrix\lib目录,重启就可在Select Post Processors的下拉选项中看到
2.在heritrix的jar文件中的modules目录下的Processor.options增加前面提到的内容,但这种方式不被推荐使用,原因你懂的

以下是heritrix关于Processor.options的配置说明:
To make your module known to Heritrix, you need to make mention of it in the appropriate src/conf/modules file: i.e. if your module is a Processor, it needs to be mentioned in the Processor.options file. The options files get built into the Heritrix jar.

“A little known fact about Heritrix: When trying to read modules/Processor.options Heritrix will concatenate any such files it finds on the classpath. This means that if you write your own processor and wrap it in a jar you can simply include in that jar a modules/Processor.options file with just the one line needed to add your processor. Then simply add the new jar to the $HERITRIX_HOME/lib directory and you are done. No need to mess with the Heritrix binaries. For an example of how this is done, look at the code for this project: deduplicator ” [Kristinn Siguresson on the mailing list, 3281].

If everything seems ok so far, then we are almost ready to write some real modules.

你可能感兴趣的:(scheduler)