随笔分类 -  Apache Storm

上一页 1 2 3 下一页

Storm-源码分析- Disruptor在storm中的使用
摘要:Disruptor 2.0, (http://ifeve.com/disruptor-2-change/) Disruptor为了更便于使用, 在2.0做了比较大的调整, 比较突出的是更换了几乎所有的概念名 老版本, 新版本, 从左到右的变化如下, 1. Producer –> Publisher 2. ProducerBarrier被integrate到Ring... 阅读全文

posted @ 2013-07-10 16:18 fxjwind 阅读(5225) 评论(0) 推荐(1) 编辑

LMAX Disruptor 原理
摘要:http://mechanitis.blogspot.com/search/label/disruptor http://ifeve.com/disruptor/, 并发框架Disruptor译文 http://blog.sina.com.cn/s/blog_68ffc7a4010150yl.html, 论文译文 LMAX需要搭建high performance的交易平台, 所以需要基... 阅读全文

posted @ 2013-07-09 15:28 fxjwind 阅读(4607) 评论(1) 推荐(0) 编辑

Storm-源码分析- timer (backtype.storm.timer)
摘要:mk-timer timer是基于PriorityQueue实现的(和PriorityBlockingQueue区别, 在于没有阻塞机制, 不是线程安全的), 优先级队列是堆数据结构的典型应用 默认情况下, 按照自然顺序(其实就是默认comparator的定义), 最小的元素排在堆头 当然也可以自己重新实现comparator接口, 比如timer就用reify重新实现了comp... 阅读全文

posted @ 2013-07-02 14:39 fxjwind 阅读(1083) 评论(0) 推荐(0) 编辑

Storm-源码分析-Topology Submit-Supervisor
摘要:mk-supervisor (defserverfn mk-supervisor [conf shared-context ^ISupervisor isupervisor] (log-message "Starting Supervisor with conf " conf) (.prepare isupervisor conf (supervisor-isupervisor-dir con... 阅读全文

posted @ 2013-06-28 17:13 fxjwind 阅读(1885) 评论(0) 推荐(0) 编辑

Storm-源码分析- Multimethods使用例子
摘要:1. storm通过multimethods来区分local和distributed模式 当调用launch-worker的时候, clojure会自动根据defmulti里面定义的fn来判断是调用哪个版本的launch-worker (defmulti launch-worker (fn [supervisor & _] (cluster-mode (:conf supervis... 阅读全文

posted @ 2013-06-28 16:39 fxjwind 阅读(686) 评论(0) 推荐(0) 编辑

Storm-源码分析- Storm中Zookeeper的使用
摘要:在backtype.storm.cluster.clj中, 定义了storm对于Zookeeper的使用 ClusterState 首先定义操作Zookeeper集群的interface (defprotocol ClusterState (set-ephemeral-node [this path data]) (delete-node [this path]) (cre... 阅读全文

posted @ 2013-06-26 10:11 fxjwind 阅读(4685) 评论(0) 推荐(0) 编辑

Storm-源码分析-EventManager (backtype.storm.event)
摘要:Protocol and DataType 大体结构, 定义protocol EventManager, 其实就是定义interface 函数event-manager, 主要做2件事 1. 启动event queue的处理线程, 不断从queue中取出event-fn并执行 2. 返回实现EventManager的匿名record(reify部分, 实现protocol) ... 阅读全文

posted @ 2013-06-24 17:37 fxjwind 阅读(953) 评论(0) 推荐(0) 编辑

Storm-源码分析-Topology Submit-Nimbus
摘要:Nimbus Server Nimbus server, 首先从启动命令开始, 同样是使用storm命令"storm nimbus”来启动 看下源码, 此处和上面client不同, jvmtype="-server", 最终调用"backtype.storm.daemon.nimbus"的main nimbus是用clojure实现的, 但是clojure是基于JVM的, 所以在... 阅读全文

posted @ 2013-06-19 15:28 fxjwind 阅读(3033) 评论(5) 推荐(0) 编辑

Storm-源码分析-Topology Submit-Nimbus-mk-assignments
摘要:什么是"mk-assignment”, 主要就是产生executor->node+port关系, 将executor分配到哪个node的哪个slot上(port代表slot, 一个slot可以run一个worker进程, 一个worker包含多个executor线程) 先搞清什么是executor, 参考Storm-源码分析- Component ,Executor ,Task之间关系 ;;... 阅读全文

posted @ 2013-06-19 15:22 fxjwind 阅读(2904) 评论(7) 推荐(0) 编辑

Storm-源码分析- Component ,Executor ,Task之间关系
摘要:Component包含Executor(threads)的个数 在StormBase中的num-executors, 这对应于你写topology代码时, 为每个component指定的并发数(通过setBolt和setSpout) Component和Task的对应关系, (storm-task-info) 默认你可以不指定task数, 那么task和exec... 阅读全文

posted @ 2013-06-18 15:43 fxjwind 阅读(4154) 评论(3) 推荐(0) 编辑

Storm-源码分析- Scheduler (backtype.storm.scheduler)
摘要:首先看看IScheduler接口的定义, 主要实现两个接口, prepare和schedule 对于schedule的参数注释写的非常清楚, topologies包含所有topology的静态信息, 而cluster中包含了topology的运行态信息 根据他们就可以来判断如何assignment package backtype.storm.scheduler;impor... 阅读全文

posted @ 2013-06-14 17:41 fxjwind 阅读(2543) 评论(3) 推荐(0) 编辑

Storm-源码分析-Topology Submit-Client
摘要:1 Storm Client 最开始使用storm命令来启动topology, 如下 storm jar storm-starter-0.0.1-SNAPSHOT-standalone.jar storm.starter.WordCountTopology 这个storm命令是用python实现的, 看看其中的jar函数, 很简单, 调用exec_storm_class, 其中jv... 阅读全文

posted @ 2013-06-05 15:52 fxjwind 阅读(3523) 评论(0) 推荐(0) 编辑

Clojure常用模块
摘要:http://qiujj.com/static/clojure-handbook.html http://clojure.github.io/clojure/ Base ->, (-> x form & more) http://clojuredocs.org/clojure_core/clojure.core/-%3E 线性化嵌套, 使其更具有可读性, Inserts x as the se... 阅读全文

posted @ 2013-06-04 17:48 fxjwind 阅读(1538) 评论(0) 推荐(0) 编辑

Storm-源码分析- Thrift的使用
摘要:1 IDL 首先是storm.thrift, 作为IDL里面定义了用到的数据结构和service 然后backtype.storm.generated, 存放从IDL通过Thrift自动转化成的Java代码 比如对于nimbus service 在IDL的定义为, service Nimbus { void submitTopology(1: string name, 2:... 阅读全文

posted @ 2013-06-04 16:50 fxjwind 阅读(3956) 评论(5) 推荐(0) 编辑

Storm starter - Overview
摘要:Storm的starter例子, 都给的很有诚意, 不光是例子, 而是可以直接使用在实际的场景里面. 并且提高一些很有用的tool, 比如SlidingWindowCounter, TimeCacheMap 所以starter可以说是提高了基于storm编程的框架, 值得认真研究一下... ExclamationTopology, 基本的Topology 没有什么特别的地方... 阅读全文

posted @ 2013-05-24 18:05 fxjwind 阅读(2076) 评论(1) 推荐(0) 编辑

Storm starter - SingleJoinExample
摘要:Storm常见模式——流聚合 Topology 1.定义两个spout, 分别是genderSpout, ageSpout Fields, ("id", "gender"), ("id", "age"), 最终join的结果应该是("id", "gender", "age") 2. 在设置SingleJoinBolt需要将outFields作为参数, 即告诉bolt, join完的结... 阅读全文

posted @ 2013-05-24 10:21 fxjwind 阅读(1686) 评论(0) 推荐(0) 编辑

Storm starter - RollingTopWords
摘要:Implementing Real-Time Trending Topics With a Distributed Rolling Count Algorithm in Storm, 图文并茂, 早看到就直接翻译这篇了... 计算top N words的topology, 用于比如trending topics or trending images on Twitter. 实现了滑动窗口... 阅读全文

posted @ 2013-05-22 16:26 fxjwind 阅读(2995) 评论(3) 推荐(1) 编辑

Thrift
摘要:http://thrift.apache.org/ http://blog.csdn.net/ellios/article/details/6293129, thrift 入门介绍 http://en.wikipedia.org/wiki/Apache_Thrift Thrift: Scalable Cross-Language Services Implementation 对于... 阅读全文

posted @ 2013-05-16 15:48 fxjwind 阅读(1506) 评论(0) 推荐(0) 编辑

Storm 多语言支持
摘要:Using non JVM languages with Storm https://github.com/nathanmarz/storm/wiki/Using-non-JVM-languages-with-Storm Multilang protocol https://github.com/nathanmarz/storm/wiki/Multilang-protocol Usi... 阅读全文

posted @ 2013-05-10 17:50 fxjwind 阅读(2827) 评论(0) 推荐(0) 编辑

Storm - Transactional-topologies
摘要:https://github.com/nathanmarz/storm/wiki/Transactional-topologies http://xumingming.sinaapp.com/736/twitter-storm-transactional-topolgoy/Storm guarant... 阅读全文

posted @ 2013-05-10 11:21 fxjwind 阅读(1837) 评论(0) 推荐(0) 编辑

上一页 1 2 3 下一页