5 Star 1 Fork 0

Green / D-crawler-sys

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

D-crawler-sys (BIG BUG)

介绍

大数据软件技术大作业:分布式爬虫 BIG BUG 使用了 redis, hbase

一开始还考虑到使用 zookeeper 做状态管理,用redis布隆过滤器插件做重复url的剔除。

但因为时间不够放弃了。

最后提交时,很多部分没有做好。 比如爬虫job规则的更新,数据库里的更新了,但是 LRU 缓存没有跟上。

安装教程

  1. 分布式安装配置 redis,hdfs,hbase (其中redis-cluster的配置相当的繁琐)

  2. 安装python3.6,pypi

  3. 找到 pip-requirements.txt 文件,执行命令: pip install -r requriements.txt

    aiohttp==3.3.2
    happybase==1.2.0
    redis==3.2.1
    rediscluster==0.5.3
    selenium==3.141.0
    Beaker==1.10.1
    bottle==0.12.16

使用注意点

  1. 使用前先对 config 文件夹下各文件进行配置,主要是配置 redis, hbase-thrift 的 host 和 端口号。

  2. 要特别注意 redis-conf.json文件

    single_node_mode 为 true 时,使用单机配置,即 "host","ip";为 false 使用集群配置,即 "master_nodes"

{
    "single_node_mode":false,
    "host":"localhost", 
    "port":6379,
    "decode_responses":true,
    "namespace":"crawler",
    "queue_name":"queue",
    "close_set_name":"close_set",
    "master_nodes":[
        {"host":"192.168.133.128","port":"7001"},
		{"host":"192.168.133.128","port":"7002"},
		{"host":"192.168.133.128","port":"7003"}
    ]
}
  1. 在项目目录运行 python -m http.server 命令,在该目录启动web服务器,主页为该目录下的 index.html。输出的端口号即之后web页面的端口号。
  2. 运行 bash run-crawler.sh 启动爬虫端;运行 bash run-server.sh 启动服务端。

空文件

简介

大数据软件技术大作业:分布式爬虫 使用了 redis, hbase, zookeeper 展开 收起
Python
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/bitosky/D-crawler-sys.git
git@gitee.com:bitosky/D-crawler-sys.git
bitosky
D-crawler-sys
D-crawler-sys
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891