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

标签 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

最佳答案

不幸的是,这个功能还没有添加到 Nutch 的 2.x 分支中,作为一般规则,我相信 1.x 分支具有更多功能并且性能更好(尽管这正在改变)。如果您需要保留在 2.x 上,那么我建议您自行实现该功能,或者将 links-indexer 插件从 1.x 迁移到 2.x(我相信迁移索引器插件会更容易)。我本来有这个计划,但找不到时间。

关于java - 如何在 Apache Nutch 2.x 中获取 webgraph,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41009003/

相关文章:

java - 当我循环执行 Apache POI 时,未创建新工作表

php - Wordpress 子目录给出 404

python beautifulsoup 爬虫从 mysql 中选取 URL 时出错

solr - Nutch:数据读取和添加元数据

java - 在java中加载DNNClassifier

java - 使焦点不转到第一个组件

java - 自定义默认登录页面 Alfresco

java - 使用 AJP 连接器和 mod_proxy 在 Tomcat 前面的 Apache 出错

java - 关闭socket并释放资源

optimization - 存储爬虫状态的最优化方式?