storm 知识点汇总

storm分为
一:Nimbus:派发task,监控task,重启task。Nimbus is stateless and stores all of its data in ZooKeeper,失败后重新启动对job没有影响
二:Supervisor nodes:创建,启动,停止worker processor to execute the tasks assigned to that node.Like Nimbus, a supervisor
daemon is also fail-fast and stores all of its state in ZooKeeper so that it can be restarted
without any state loss.
三:The ZooKeeper cluster:All of the states associated with
the cluster and the various tasks submitted to the Storm are stored in ZooKeeper。Nimbus and supervisor nodes do not communicate directly with each other but
through ZooKeeper. As all data is stored in ZooKeeper, both Nimbus and the
supervisor daemons can be killed abruptly without adversely affecting the cluster.

四:Node(物理节点)-> 多个 workers(JVMs) -> 多个executors(threads) -> 多个tasks(bolt/spout instances)
这里如果一个bolt/spout需要并行多个tasks,逻辑上一个bolt/spout叫component
五:grouping:决定tuple的流向
1. Shuffle Grouping
2、Fields Grouping
3、All Grouping
4、Global Grouping
5、None Grouping
6、Direct Grouping
7、Local or shuffle grouping
六:消息的可靠处理机制:
tuple tree:spout(tuple) -> blotA(生成多个tuple) -> blotB(又生成多个tuple)
以上每个tuple都会生成一个messgeId,完成后会删除相应的tuple messageId,当每个tuple messageId都被删除后,
就证明此次从spout发出去的tuple成功了
记录messageId时storm用到了异或,以下是异或的规则,它有一个特性: a xor b xor a = b,
0 xor 0 = 0
1 xor 1 = 0
1 xor 0 = 1
0 xor 1 = 1
所以storm 有个64bit的内存空间,每生成一个tuple messageId都会做异或,当某个tuple messageId完成后再做异或,
最后等于0时,就说明这个从spout发出的tuple成功了

Storm会调用Spout中的ack方法,并将此消息的messageID作为参数传入。同理,如果某消息处理
超时,则此消息对 应的Spout的fail方法会被调用,调用时此消息的messageID会被作
为参数传入

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值