如何在Apache Nutch 2.x中获取webgraph

时间:2016-12-07 03:39:02

标签: java apache web-crawler nutch

我正在使用apache nutch 2.3.1来抓取几个网站。我必须找到抓取数据的webgrapg,但不幸的是,此版本中没有定义类,如1.x版。有人可以指导我这件事。 以下是版本2.3.1的完整命令行选项(但没有webgraph)

Usage: nutch COMMAND
where COMMAND is one of:
 inject     inject new urls into the database
 hostinject     creates or updates an existing host table from a text file
 generate   generate new batches to fetch from crawl db
 fetch      fetch URLs marked during generate
 parse      parse URLs marked during fetch
 updatedb   update web table after parsing
 updatehostdb   update host table after parsing
 readdb     read/dump records from page database
 readhostdb     display entries from the hostDB
 index          run the plugin-based indexer on parsed batches
 elasticindex   run the elasticsearch indexer - DEPRECATED use the index command instead
 solrindex  run the solr indexer on parsed batches - DEPRECATED use the index command instead
 solrdedup  remove duplicates from solr
 solrclean      remove HTTP 301 and 404 documents from solr - DEPRECATED use the clean command instead
 clean          remove HTTP 301 and 404 documents and duplicates from indexing backends configured via plugins
 parsechecker   check the parser for a given url
 indexchecker   check the indexing filters for a given url
 plugin     load a plugin and run one of its classes main()
 nutchserver    run a (local) Nutch server on a user defined port
 webapp         run a local Nutch web application
 junit          runs the given JUnit test
 or
 CLASSNAME  run the class named CLASSNAME

1 个答案:

答案 0 :(得分:2)

不幸的是,这个功能尚未添加到Nutch的2.x分支中,作为一般规则我认为1.x分支具有更多功能并且表现更好(尽管这种情况正在发生变化)。如果您需要保持2.x,那么我建议您自己实现该功能,或者将links-indexer插件从1.x迁移到2.x(我相信迁移索引器插件会更容易)。我有这个计划,但找不到时间。