惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
L
LINUX DO - 最新话题
PCI Perspectives
PCI Perspectives
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cybersecurity and Infrastructure Security Agency CISA
Webroot Blog
Webroot Blog
V2EX - 技术
V2EX - 技术
S
Security @ Cisco Blogs
T
The Exploit Database - CXSecurity.com
S
Schneier on Security
Latest news
Latest news
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Tor Project blog
Know Your Adversary
Know Your Adversary
S
Secure Thoughts
Project Zero
Project Zero
Hacker News: Ask HN
Hacker News: Ask HN
C
Cisco Blogs
K
Kaspersky official blog
Google DeepMind News
Google DeepMind News
N
News | PayPal Newsroom
V
Vulnerabilities – Threatpost
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
H
Heimdal Security Blog
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
C
Cyber Attacks, Cyber Crime and Cyber Security
L
Lohrmann on Cybersecurity
N
News and Events Feed by Topic
The Last Watchdog
The Last Watchdog
D
DataBreaches.Net
W
WeLiveSecurity
M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
Y
Y Combinator Blog
TaoSecurity Blog
TaoSecurity Blog
AWS News Blog
AWS News Blog
T
Threat Research - Cisco Blogs
大猫的无限游戏
大猫的无限游戏
I
InfoQ
Cloudbric
Cloudbric
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Forbes - Security
Forbes - Security
Attack and Defense Labs
Attack and Defense Labs
The Cloudflare Blog
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
Cyberwarzone
Cyberwarzone

Storm

关于 Storm 的 Reference 和 memcache 的一个问题 - V2EX
如果修改了 storm 的 spout 和 bolt 代码,就 kill 掉作业,重新提交吧。那么 kill 作业的时候如何做 cleanup 的工作呢? - V2EX
codingpp · 2014-06-12 · via Storm

这是一个创建于 4385 天前的主题,其中的信息可能已经有所发展或是发生改变。

我的作业是这样的:
spout收集日志->bolt汇总日志并每隔1秒钟插入数据库
每条日志都需要处理不能丢
kill task的时候spout的会先置为失效,这时候就没有消息推送到bolt中了。然后再停止掉
bolt中没有数据推送过来,所以就不会再触发process方法了
那么这1秒钟内数据将没法插入到数据库里了
storm里的cleanup方法貌似只能工作在本地模式下,那么我想要在分布式模式下kill作业的时候做下cleanup的处理该如何做呢?

codingpp

1

codingpp      2014 年 6 月 12 日

v2ex的大神们有用storm的吗

halfelf

2

halfelf      2014 年 6 月 12 日

写好spout,ack失败时将日志扔回去。
这种事情不是kafka配合storm最擅长么。

codingpp

3

codingpp      2014 年 6 月 12 日

@halfelf
主要是为了减轻数据库的压力,我的bolt会汇总1秒钟内的日志,然后再插入数据库
这时候每天消息一经ack成功了。。。
但是我更新了代码,停止作业,我没有来及提交数据库的日志就没法处理了

halfelf

4

halfelf      2014 年 6 月 13 日

明白了,在prepared bolt里做缓存了。写个hook,覆盖BaseTaskHook的cleanup方法