随笔分类 -  Apache Storm

1 2 3 下一页

让Storm插上CEP的翅膀 - Siddhi调研和集成
摘要:什么是 Siddhi?Siddhi 是一种 lightweight, easy-to-use, open source CEP(Complex Event Processing)引擎,由wso2公司开发(http://wso2.com/about/)。像绝大多数的 CEP 系统一样,Siddhi 支... 阅读全文

posted @ 2015-12-15 16:03 fxjwind 阅读(9306) 评论(0) 推荐(0) 编辑

漫谈流式计算的一致性
摘要:参考, http://data-artisans.com/high-throughput-low-latency-and-exactly-once-stream-processing-with-apache-flink/ http://www.confluent.io/blog/real-time-stream-processing-the-next-step-for-apache-flink... 阅读全文

posted @ 2015-11-18 17:59 fxjwind 阅读(3680) 评论(0) 推荐(0) 编辑

如何保障流式处理的数据一致性
摘要:背景 相对于传统的Hadoop这样的batch分析平台,流式分析的优点就是实时性, 即可以在秒级别延迟上得到分析结果 。 当然缺点是, 很难保证强一致性,即Exactly-Once语义 (在海量数据的前提下,为了保障吞吐量,无法使用类似事务的强一致性的方案)。 一般流式分析平台都会promise较弱的一致性,即Least-Once语义,保证数据不丢但允许数据重复。 但这只是在正常... 阅读全文

posted @ 2015-07-30 15:55 fxjwind 阅读(1704) 评论(0) 推荐(0) 编辑

storm-kafka-0.8-plus 源码解析
摘要:https://github.com/wurstmeister/storm-kafka-0.8-plus http://blog.csdn.net/xeseo/article/details/18615761 准备,一些相关类 GlobalPartitionInformation (storm.kafka.trident) 记录partitionid和broker的关系 Gl... 阅读全文

posted @ 2014-06-25 16:35 fxjwind 阅读(3973) 评论(0) 推荐(0) 编辑

Storm ack和fail机制再论
摘要:之前对这个的理解有些问题,今天用到有仔细梳理了一遍,记录一下 首先开启storm tracker机制的前提是, 1. 在spout emit tuple的时候,要加上第3个参数messageid 2. 在配置中acker数目至少为1 3. 在bolt emit的时候,要加上第二个参数anchor tuple,以保持tracker链路 流程, 1. 当tuple具有... 阅读全文

posted @ 2014-06-24 16:47 fxjwind 阅读(2944) 评论(2) 推荐(0) 编辑

Storm-源码分析汇总
摘要:Storm Features Storm 简介 Storm Topology的并发度 Storm - Guaranteeing message processing Storm - Transactional-topologies Twitter Storm – DRPC Storm 多语言支持 Storm Starter Storm starter - Overview ... 阅读全文

posted @ 2013-08-06 11:35 fxjwind 阅读(2665) 评论(0) 推荐(0) 编辑

Storm-源码分析-acker (backtype.storm.daemon.acker)
摘要:backtype.storm.daemon.acker 设计的巧妙在于, 不用分别记录和track, stream过程中所有的tuple, 而只需要track root tuple, 而所有中间过程都通过异或更新track entry acker-init, 在spout发送一个tuple时触发, 初始化这个root tuple的track entry acker-ack, 在blot a... 阅读全文

posted @ 2013-08-06 10:34 fxjwind 阅读(1428) 评论(5) 推荐(0) 编辑

Storm-源码分析-Topology Submit-Executor
摘要:在worker中通过executor/mk-executor worker e, 创建每个executor (defn mk-executor [worker executor-id] (let [executor-data (mk-executor-data worker executor-id) ;;1.mk-executor-data _ (log-message ... 阅读全文

posted @ 2013-08-05 17:32 fxjwind 阅读(1702) 评论(3) 推荐(0) 编辑

Storm-源码分析-Topology Submit-Executor-mk-threads
摘要:对于executor thread是整个storm最为核心的代码, 因为在这个thread里面真正完成了大部分工作, 而其他的如supervisor,worker都是封装调用.对于executor的mk-threads, 是通过mutilmethods对spout和bolt分别定义不同的逻辑1. S... 阅读全文

posted @ 2013-08-05 17:22 fxjwind 阅读(3317) 评论(3) 推荐(2) 编辑

Storm-源码分析- bolt (backtype.storm.task)
摘要:Bolt关键的接口为execute, Tuple的真正处理逻辑, 通过OutputCollector.emit发出新的tuples, 调用ack或fail处理的tuple /** * An IBolt represents a component that takes tuples as input and produces tuples * as output. An IBolt ... 阅读全文

posted @ 2013-08-05 14:05 fxjwind 阅读(2235) 评论(0) 推荐(0) 编辑

Storm-源码分析- spout (backtype.storm.spout)
摘要:1. ISpout接口 ISpout作为实现spout的核心interface, spout负责feeding message, 并且track这些message. 如果需要Spout track发出的message, 必须给出message-id, 这个message-id可以是任意类型, 但是如果不指定或将message-id置空, storm就不会track这个message 必须要... 阅读全文

posted @ 2013-08-01 15:31 fxjwind 阅读(3511) 评论(0) 推荐(0) 编辑

Storm-源码分析-Topology Submit-Task
摘要:mk-task, 比较简单, 因为task只是概念上的结构, 不象其他worker, executor都需要创建进程或线程 所以其核心其实就是mk-task-data, 1. 创建TopologyContext对象, 其实就是把之前的topology对象和worker-data混合到一起, 便于task在执行时可以取到需要的topology信息. 2. 创建task-obje... 阅读全文

posted @ 2013-07-31 13:59 fxjwind 阅读(1554) 评论(0) 推荐(0) 编辑

Storm-源码分析- hook (backtype.storm.hooks)
摘要:task hook 在某些task事件发生时, 如果用户希望执行一些额外的逻辑, 就需要使用hook 当前定义如下事件, emit, cleanup, spoutAck…… 用户只需要开发实现ITaskHook的类, 并将类名配置到(storm-conf TOPOLOGY-AUTO-TASK-HOOKS) 系统会在这些事件发生时, 自动调用所有注册的hook中的相应的functions ... 阅读全文

posted @ 2013-07-30 15:35 fxjwind 阅读(1342) 评论(0) 推荐(0) 编辑

Storm-源码分析- metric
摘要:首先定义一系列metric相关的interface, IMetric, IReducer, ICombiner (backtype.storm.metric.api) 在task中, 创建一系列builtin-metrics, (backtype.storm.daemon.builtin-metrics), 并注册到topology context里面 task会不断的利用如spout-ack... 阅读全文

posted @ 2013-07-30 14:23 fxjwind 阅读(3935) 评论(0) 推荐(0) 编辑

Storm-源码分析-Stats (backtype.storm.stats)
摘要:会发现, 现在storm里面有两套metrics系统, metrics framework和stats framework并且在所有地方都是同时注册两套, 貌似准备用metrics来替代stats, 但当前版本UI仍然使用stats这个模块统计的数据怎么被使用, 1. 在worker中, 会定期调用... 阅读全文

posted @ 2013-07-29 15:58 fxjwind 阅读(1782) 评论(9) 推荐(0) 编辑

Storm-源码分析-Topology Submit-Task-TopologyContext (backtype.storm.task)
摘要:1. GeneralTopologyContext 记录了Topology的基本信息, 包含StormTopology, StormConf 已经从他们推导出的, task和component, component的streams, input/output信息 public class GeneralTopologyContext implements JSONAware { ... 阅读全文

posted @ 2013-07-26 16:26 fxjwind 阅读(1938) 评论(4) 推荐(0) 编辑

Storm-源码分析-Streaming Grouping (backtype.storm.daemon.executor)
摘要:executor在发送outbounding message的时候, 需要决定发送到next component的哪些tasks 这里就需要用到streaming grouping, 1. mk-grouper 除了direct grouping, 返回的是grouper function, 执行该grouper function得到target tasks list dir... 阅读全文

posted @ 2013-07-26 11:16 fxjwind 阅读(2753) 评论(0) 推荐(0) 编辑

Storm-源码分析-Topology Submit-Worker
摘要:1 mk-worker 和其他的daemon一样, 都是通过defserverfn macro来创建worker (defserverfn mk-worker [conf shared-mq-context storm-id assignment-id port worker-id] (log-message "Launching worker for " storm-id " on... 阅读全文

posted @ 2013-07-23 14:49 fxjwind 阅读(2598) 评论(0) 推荐(0) 编辑

Storm-源码分析- Messaging (backtype.storm.messaging)
摘要:先定义两个接口和一个类 TaskMessage类本身比较好理解, 抽象storm的message格式 对于IContext, 注释也说了, 定义messaging plugin, 通过什么渠道去发送message, storm这里设计成可替换的 默认定义storm实现了local和ZMQ两种plugin, 当然你可以实现更多的 local应该是用于local mode... 阅读全文

posted @ 2013-07-16 18:09 fxjwind 阅读(1541) 评论(4) 推荐(0) 编辑

Storm-源码分析-LocalState (backtype.storm.utils)
摘要:LocalState A simple, durable, atomic K/V database. *Very inefficient*, should only be used for occasional reads/writes. Every read/write hits disk. 基于map实现, 每次读写都需要从磁盘上将数据读出, 并反序列化成map, 这个过程称为sna... 阅读全文

posted @ 2013-07-11 17:01 fxjwind 阅读(1228) 评论(0) 推荐(0) 编辑

1 2 3 下一页