1 / 14

Scarf,scarf2 项目总结

Scarf,scarf2 项目总结. 2010-07-07. 项目介绍及当前进度 系统架构 数据流情况 数据获取的方法 接口说明 存在问题及改进思路 应用部署 应用的维护 总结. 内容. 项目介绍及当前进度. Scarf Xmonitor 微博应用 开发时间: 2010-02-09 – 2010-03-02 代码量: 41 本 java 程序,代码: 1726 行,注释: 289 进度:完成 Scarf2 社会化媒体信息挖掘项目 开发时间: 2010-05-04 – 现在

kosey
Download Presentation

Scarf,scarf2 项目总结

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Scarf,scarf2项目总结 2010-07-07

  2. 项目介绍及当前进度 • 系统架构 • 数据流情况 • 数据获取的方法 • 接口说明 • 存在问题及改进思路 • 应用部署 • 应用的维护 • 总结 内容

  3. 项目介绍及当前进度 • Scarf • Xmonitor微博应用 • 开发时间:2010-02-09 – 2010-03-02 • 代码量:41本java程序,代码:1726行,注释:289 • 进度:完成 • Scarf2 • 社会化媒体信息挖掘项目 • 开发时间:2010-05-04 – 现在 • 代码量:76本java程序,代码:5740行,注释:1005 • 进度:未完成

  4. 系统架构

  5. 数据流情况

  6. 数据获取的方法 1.网站登录 2.构造抓取的url 3.制定抓取规则 4.启动eloo的抓取引擎

  7. 接口说明

  8. 接口说明 包结构: com.wintim.scarf: 主程序运行包 com.wintim.scarf.filter: eloo解析时用到的过滤器 com.wintim.scarf.parser: scarf的解析器 com.wintim.scarf.transactor: scarf的处理器 com.wintim.scarf.analysis: 数据分析处理 com.wintim.scarf.util: 工具类 com.wintim.scarf.vo scarf的值对象 SqlScriptBuilder是 scarf的主程序,调用XMLAnalyze(解析xml文件),XmlTransactor(生成sql脚本) XMLAnalyze解析器类根据配置文件conf/scarf-conf.xml中的配置信息将xml文件解析为实现了Entity接口的实体类对象

  9. 接口说明 <doc> <site>microblog_sina</site> <user_name>艾颂</user_name> <user_id>1643145217</user_id> …… </doc> scarf-conf.xml: 配置片段 <conf-entity> <entity>com.wintim.scarf.vo.User</entity> <parser>com.wintim.scarf.parser.UserParser</parser> <transactor>com.wintim.scarf.transactor.UserTransactor</transactor> </conf-entity> 上面的UserParser解析器将符合用户解析规则 的<doc>节点解析成User对象,并交由UserTransactor处理器处理,UserTransactor将 对应生成一用户信息的插入语句。 所有的解析器类实现EntityParser接 口,所有的处理器类实现EntityTransactor接口,vo 对象实现Entity接口

  10. 存在问题及改进思路 1.数据抓取上的问题 2.数据分析上的问题 3.热门话题 4.代码改善 5.系统的自动报警

  11. 应用部署 前台部署: 随xmonitor一起部署,应用已集成到xmonitor2.0中 后台部署: 1.从服务器down最新的scarf源代码,运行ant pack,打包代码:scarf.tar.gz 2.拷贝scarf.tar.gz到n05 /xmonitor/service/services/下,并解压缩 3.copy /scarf/scarf-0.1.0.jar to /scarf/lib,/scarf/sbin/eloo/lib(两者都需要) 4.修改/scarf /sbin/eloo/saveData.sh,/scarf/conf/data_source.property中对应数据库登录名,密码,数据库服 务器地址 5.修改/scarf/sbin/eloo /crawl_sina.sh中的java_home 6.修改/scarf /sbin/eloo/crawl_sina.sh SCARF路径 7.crontab中添加以下两项 /15 9-23 * * * /xmonitor/service/services/scarf/sbin/eloo/crawl_sina.sh 0,2,2 > /xmonitor/service/services/scarf/sbin/eloo/crawl_sina_blogger.log 0 8 * * * /xmonitor/service/services/scarf/sbin/eloo/crawl_sina.sh 50,0,0 > /xmonitor/service/services/scarf/sbin/eloo/crawl_sina_fans.log

  12. 应用的维护 规则维护

  13. 总结 我学到了什么: • eloo,及相关工具(httpwatch) • Python • Mysql • linux shell 常用命令,scp,tar,ps x grep,vi awk,sed • Svn • Java Collections Framework 自己未能解决的一些问题: 1.关于数据库设计,查询优化 2.scarf中设计的问题 3.orm 4.mysql备份命令 5.java并行处理 6.lucene学习

More Related