当我们为nutch的架构发愁的时候,nutch的开发人员送来了nutchbase。我一些简单的测试表明,在hadoop0.20.1和hbase0.20.2上,稍加修改可以运行起来。
它的优点很明显:架构合理.
开发者是这样说的,引用自jira
http://issues.apache.org/jira/browse/NUTCH-650
A) Why integrate with hbase?
All your data in a central location
No more segment/crawldb/linkdb merges.
No more "missing" data in a job. There are a lot of places where we copy data from one structure to another just so that it is available in a later job. For example, during parsing we don't have access to a URL's fetch status. So we copy fetch status into content metadata. This will no longer be necessary with hbase integration.
A much simpler data model. If you want to update a small part in a single record, now you have to write a MR job that reads the relevant directory, change the single record, remove old directory and rename new directory. With hbase, you can just update that record. Also, hbase gives us access to Yahoo! Pig, which I think, with its SQL-ish language may be easier for people to understand and use.
B) Design
Design is actually rather straightforward.
We store everything (fetch time, status, content, parsed text, outlinks, inlinks, etc.) in hbase. I have written a small utility class that creates "webtable" with necessary columns.
So now most jobs just take the name of the table as input.
There are two main classes for interfacing with hbase. ImmutableRowPart wraps around a RowResult and has helper getters (getStatus(), getContent(), etc.). RowPart is similar to ImmutableRowPart but also has setters. The idea is that RowPart also wraps RowResult but also keeps a list of updates done to that row. So when getSomething is called, it first checks if Something is already updated (if so then returns the updated version) or returns from RowResult. RowPart can also create a BatchUpdate from its list of updates.
URLs are stores in reversed host order. For example, http://bar.foo.com:8983/to/index.html?a=b becomes com.foo.bar:http:8983/to/index.html?a=b. This way, URLs from the same tld/host/domain are stored closer to each other. TableUtil has methods for reversing and unreversing URLs.
CrawlDatum Status-es are simplifed. Since everything is in central location now, no point in having a DB and FETCH status.
Jobs:
Each job marks rows so that the next job knows which rows to read. For example, if GeneratorHbase decides that a URL should be generated it marks the URL with a TMP_FETCH_MARK (Marking a url is simply creating a special metadata field.) When FetcherHbase runs, it skips over anything without this special mark.
InjectorHbase: First, a job runs where injected urls are marked. Then in the next job, if a row has the mark but nothing else (here, I assumed that if a row has "status:" column, that it already exists), InjectorHbase initializes the row.
GeneratorHbase: Supports max-per-host configuration and topN. Marks generated urls with a marker.
FetcherHbase: Very similar to original Fetcher. Marks urls successfully fetched. Skips over URLs not marked by GeneratorHbase
ParseTable: Similar to original Parser. Outlinks are stored "outlinks:<fromUrl>" -> "anchor".
UpdateTable: Does updatedb's and invertlink's job. Also clears any markers.
IndexerHbase: Indexes the entire table. Skips over URLs not parsed successfully.
分享到:
相关推荐
nutch2.3+hbase0.94.14+hadoop1.2.1安装文档.txt )
总的来说,Nutch+Solr+Hadoop 的框架搭建涉及多个组件的安装、配置和协同工作。理解这些组件的功能和相互之间的关系,以及如何通过脚本和配置文件控制它们,是成功搭建和使用该框架的关键。这个教程提供了详细步骤,...
如果要使用Hbase存储抓取的数据,还需要在Nutch的配置文件中添加Hbase的相关设置。 启动Nutch爬虫,可以使用`bin/nutch inject`命令将种子URL注入到爬虫队列,然后通过`bin/nutch fetch`, `bin/nutch updatedb`, `...
首先,Hadoop是一个由Apache软件基金会支持的开源分布式存储与计算框架,其发展起源于Apache Lucene、Apache Nutch以及Google的三大论文:MapReduce、GFS和BigTable。Hadoop生态系统包括Hadoop核心、Hadoop Common、...
### nutch+lucene开发自己的搜索引擎知识点总结 #### 一、概览 - **标题与描述**: 本资料“nutch+lucene开发自己的搜索引擎ch3.pdf”聚焦于介绍如何使用Nutch和Lucene来构建自己的搜索引擎,特别强调了第三章:...
标题中的“人工智能-项目实践-搜索引擎-基于Nutch+ElasticSearch+MySQL+SSM的简易搜索引擎”揭示了一个项目,旨在构建一个简易的搜索引擎,利用了人工智能的一些原理和技术。这个项目结合了多个开源工具,包括Nutch...
<项目介绍> 该资源内项目源码是个人的毕设,代码都测试ok,都是运行成功后才上传资源,答辩评审平均分达到96分,放心下载使用! 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!...
所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答!该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!...
Linux下Nutch分布式配置和使用.pdf Lucene+Nutch源码.rar Lucene学习笔记.doc nutch_tutorial.pdf nutch二次开发总结.txt nutch入门.pdf nutch入门学习.pdf Nutch全文搜索学习笔记.doc Yahoo的Hadoop教程.doc [硕士...
Nutch 是一个开源的全文搜索引擎框架,主要用于网络数据抓取,是Java开发的,因此它为Java开发者提供了一个构建大规模网络爬虫的平台。在Java环境下结合Eclipse IDE,我们可以轻松地开发和调试Nutch爬虫项目。下面将...
### Windows下cygwin+MyEclipse 8.5+Nutch1.2+Tomcat 6.0 本文旨在详细介绍如何在Windows环境下搭建基于cygwin、MyEclipse 8.5、Nutch 1.2及Tomcat 6.0的开发环境,并对每个步骤进行深入解析。 #### 一、Cygwin的...
《Lucene+Nutch:搜索引擎开发深度解析》一书的源码及详细说明是搜索引擎开发者和爱好者的重要参考资料。这本书深入探讨了如何使用Apache Lucene和Nutch构建一个完整的搜索引擎系统,涵盖了从网页抓取到索引建立,再...
完整的《Lucene+nutch搜索引擎开发》PDF版一共83.6M,无奈我上传的最高限是80M,所以切成两个。这一个是主文件,还需要下载一个副文件Lucene+nutch搜索引擎开发.z01。解压时直接放到一起,解压这个主文件就行了。
Nutch可以与HBase、Cassandra等NoSQL数据库集成,用于存储大量抓取数据。此外,也可以与Apache Tika一起工作,提取网页中的元信息和内容。 12. **持续学习与更新** Nutch是一个活跃的开源项目,定期会有新功能和...
### Nutch 2.3.1 安装与配置指南 #### 一、配置 ant 环境 在安装 Nutch 之前,首先需要确保环境中已经安装了 Apache Ant 工具,因为 Nutch 的构建过程依赖于 Ant。以下是具体步骤: 1. **下载 ant**: - 访问 ...
Nutch 是一个开源的网络爬虫项目,用于抓取互联网上的网页并建立索引,而Tomcat是一款流行的Java应用服务器,常用来部署Web应用程序。在本文中,我们将深入探讨如何在Tomcat环境下部署Nutch以及解决相关问题。 首先...
《Lucene+Nutch搜索引擎开发:王学松源代码解析》 在信息技术日新月异的今天,搜索引擎已经成为了人们获取信息的重要工具。Lucene和Nutch是两个在开源社区广泛使用的搜索引擎技术,它们为开发者提供了构建高效、可...
此外,还可以与HBase等NoSQL数据库配合,用于大规模数据存储和检索。 七、实战教程 “Nutch使用.pdf”和“Nutch入门教程.pdf”这两份文档将详细介绍如何从零开始使用Nutch,包括环境搭建、配置、启动爬虫、监控爬虫...
Nutch抓取指定网址数据,存储在HBase数据库中,存储过程由zookeeper管理。脚本调用索引器部件将数据索引化,经过索引化的数据被前端检索查询,最后前端展示查询结果,用户点击结果列表查看目标资料。
Apache Nutch 是一个开源的网络爬虫框架,用于抓取互联网上的网页并建立索引,以便进行全文搜索。Nutch 2.2.1 是一个稳定版本,它依赖于其他几个组件来完成其功能,包括 Apache Ant、Apache Tomcat、Java 开发工具包...