nutch2.1分布式抓取
来源:互联网 发布:opengl 平移矩阵 编辑:程序博客网 时间:2024/05/06 01:04
在上一篇的基础上。
1准备环境:hadoop集群、java、mysql数据库,代码可以在eclipse中运行,可以单机模式下插入数据到mysql数据库。
2修改配置文件nutch-site.xml:
<property>
<name>plugin.folders</name>
<value>./plugins</value>
<description>Directories where nutch plugins are located. Each
element may be a relative or absolute path. If absolute, it is used
as is. If relative, it is searched for on the classpath.</description>
</property>
在eclipse中选中buil.xml,run as ant,运行runtime,运行成功会产生文件夹runtime。
3 把runtime文件夹上传到hadoop集群中的master服务器(没有验证其他服务器是不是可以),我上传之后的位置是:/home/hadoop/nutch/runtime,设置环境变量:
在/etc/profile中:export NUTCH_HOME=/home/hadoop/nutch/runtime/local source /etc/profile使得修改起作用。
4应该是把url种子文件上传到hadoop。我的种子文件始终没有成功,这一步略过。
5在/home/hadoop/nutch/runtime/deploy目录下运行:
./bin/nutch crawl -dir crawl -depth 2 -threads 4 -topN 50
一点心得:nutch2之后不需要把配置文件(conf)分发到集群中的每台机器,但是修改配置文件以后需要重新用ant打包,配置才能生效。
0 0
- nutch2.1分布式抓取
- nutch2.2.1抓取流程
- Nutch2.1+mysql+solr3.6.1+中文网站抓取
- Nutch2.1+mysql+solr3.6.1+中文网站抓取
- nutch2.3分布式搭建
- nutch2.0抓取流程--nutch2crawling
- 【Nutch2.2.1基础教程之6】Nutch2.2.1抓取流程
- 【Nutch2.2.1基础教程之6】Nutch2.2.1抓取流程
- nutch2.0完全分布式部署配置
- Eclipse加载Nutch2.1
- 小试nutch2.1
- nutch2.1 部署异常集合
- windows下安装nutch2.1
- 分布式爬虫nutch2.0初体验------三大亮点
- nutch2.3 hadoop2.6.0 hbase0.98.8 分布式爬虫NoClassDefFoundError HBaseConfigurati
- python分布式抓取网页
- 分布式网页抓取
- 分布式数据包抓取系统
- ZOJ Monthly, December 2013
- Flume-ng配置
- u-boot移植第三弹——移植2013.10u-boot到RealARM210 cortex-A8开发板(支持moviNAND_Fusing_Tool_v2.0)
- UITextView 添加 pleaceholder
- POJ 3694 双连通缩点+LCA+并查集
- nutch2.1分布式抓取
- 动态规划1:最大子段和问题到最大子矩阵问题(一):最大子段和问题详谈
- 127 - "Accordian" Patience
- 图
- android添加自定义按键
- android4.0.3 关掉开机声音
- 查找sqlserver数据库中,某一字段在 哪张表的哪一列中存在
- xml布局里面使用自定义view中的内部view
- 删除动态数组中的指定元素