Nutch+HBase
Nutch+HBase
当我们为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.
Nutch+HBase的更多相关文章
- 【Nutch2.2.1基础教程之2.2】集成Nutch/Hbase/Solr构建搜索引擎之二:内容分析
请先参见"集成Nutch/Hbase/Solr构建搜索引擎之一:安装及运行",搭建测试环境 http://blog.csdn.net/jediael_lu/article/deta ...
- 【Nutch2.2.1基础教程之2.1】集成Nutch/Hbase/Solr构建搜索引擎之一:安装及运行【单机环境】
1.下载相关软件,并解压 版本号如下: (1)apache-nutch-2.2.1 (2) hbase-0.90.4 (3)solr-4.9.0 并解压至/usr/search 2.Nutch的配置 ...
- nutch,hbase,zookeeper兼容性问题
nutch-2.1使用gora-0.2.1, gora-0.2.1使用hbase-0.90.4,hbase-0.90.4和hadoop-1.1.1不兼容,hbase-0.94.4和gora-0.2.1 ...
- 【Nutch2.3基础教程】集成Nutch/Hadoop/Hbase/Solr构建搜索引擎:安装及运行【集群环境】
1.下载相关软件,并解压 版本号如下: (1)apache-nutch-2.3 (2) hadoop-1.2.1 (3)hbase-0.92.1 (4)solr-4.9.0 并解压至/opt/jedi ...
- 搜索引擎系列 ---lucene简介 创建索引和搜索初步
一.什么是Lucene? Lucene最初是由Doug Cutting开发的,2000年3月,发布第一个版本,是一个全文检索引擎的架构,提供了完整的查询引擎和索引引擎 :Lucene得名于Doug妻子 ...
- lucene简介 创建索引和搜索初步
lucene简介 创建索引和搜索初步 一.什么是Lucene? Lucene最初是由Doug Cutting开发的,2000年3月,发布第一个版本,是一个全文检索引擎的架构,提供了完整的查询引擎和索引 ...
- apache-hadoop-1.2.1、hbase、hive、mahout、nutch、solr安装教程
1 软件环境: VMware8.0 Ubuntu-12.10-desktop-i386 jdk-7u40-linux-i586.tar.gz hadoop-1.2.1.tar.gz eclipse-d ...
- 一个大数据方案:基于Nutch+Hadoop+Hbase+ElasticSearch的网络爬虫及搜索引擎
网络爬虫架构在Nutch+Hadoop之上,是一个典型的分布式离线批量处理架构,有非常优异的吞吐量和抓取性能并提供了大量的配置定制选项.由于网络爬虫只负责网络资源的抓取,所以,需要一个分布式搜索引擎, ...
- 【架构】基于Nutch+Hadoop+Hbase+ElasticSearch的网络爬虫及搜索引擎
网络爬虫架构在Nutch+Hadoop之上,是一个典型的分布式离线批量处理架构,有非常优异的吞吐量和抓取性能并提供了大量的配置定制选项.由于网络爬虫只负责网络资源的抓取,所以,需要一个分布式搜索引擎, ...
随机推荐
- 第五天学习内容 for循环,嵌套
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threa ...
- Android SDK 环境变量配置(Windows)
Android 开发需要进行adb的配置, 这里使用的是 adt-bundle-windows-x86_64-20140321, 里面捆绑的有 eclipse ,不需要再进行 其他的配置,直接下载解压 ...
- SpringMVC从Control中响应json数据
在页面上异步获取Controller中响应的json数据. <%@ page language="java" contentType="text/html; cha ...
- [精读]Spationtemporal Saliency Detection Using Textural Contrast and Its Applications
Spationtemporal Saliency Detection Using Textural Contrast and Its Applications Last Edit 2013/12/3 ...
- [计算机基础]URI与URL
URI : uniform resource identifier统一资源标示符用于指定Web资源的字符串,它定义了Web资源中的各个不同的部分.ex:http://example.org/absol ...
- PPS2013校园招聘笔试题
转载请标明出处,原文地址:http://blog.csdn.net/hackbuteer1/article/details/11473405 一.简答题 (1)一位老师有2个推理能力很强的学生,他告诉 ...
- C语言数据结构----递归的应用(斐波拉契数列、汉诺塔、strlen的递归算法)
本节主要说了递归的设计和算法实现,以及递归的基本例程斐波拉契数列.strlen的递归解法.汉诺塔和全排列递归算法. 一.递归的设计和实现 1.递归从实质上是一种数学的解决问题的思维,是一种分而治之的思 ...
- Swift - 类和结构体的区别
类和结构体有许多相同之处,也有许多不同之处. 二者区别如下: 1,类可以继承和扩展,结构体不可以 2,可以让一个类的实例来反初始化,释放存储空间,结构体做不到 3,类的对象是引用类型,而结构体是值类型 ...
- Java.util.zip adding a new file overwrites entire jar?(转)
ZIP and TAR fomats (and the old AR format) allow file append without a full rewrite. However: The Ja ...
- 14.4.9 Configuring Spin Lock Polling 配置Spin lock 轮询:
14.4.9 Configuring Spin Lock Polling 配置Spin lock 轮询: 很多InnoDB mutexes 和rw-locks 是保留一小段时间,在一个多核系统, 它可 ...