关于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.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值