storm 简介

 1、storm中一些定义html

       1.Topologiesapache

      Storm topology相似于一个MapReduce job. 惟一不一样的是MapReduce任务会结束而 topology一直运行。一个topology是由spouts,bolts组成的流分组图。spa

       2.Streams线程

    Stream由无序的tuples组成。tuple能够包含integers, longs, shorts, bytes, strings, doubles, floats, booleans, and byte arrays,也能够本身定义序列化使用本身定义的类型。code

      Streams are defined with a schema that names the fields in the stream's tuples. By default, tuples can contain integers, longs, shorts, bytes, strings, doubles, floats, booleans, and byte arrays. You can also define your own serializers so that custom types can be used natively within tuplescomponent

       3.Spoutsorm

       spouts是topology的源头, 通常spouts 会从外部读取tuples到topology.htm

      4.boltsblog

        全部的处理工做都是在bolts中完成的。Bolts能够作filtering, functions, aggregations, joins, talking to databases等等。input

        定义一个bolt时候,须要从另外一个组件中订阅流量。declarer.shuffleGrouping("1") 从 component "1"订阅流量。

      5.Stream groupings

      定义一个topology一般会为每一个bolt指定stream输入。stream分组就是将stream分配给bolts。
      6.Tasks
     每一个spout或bolt在cluster中执行不少任务。 每一个任务对应一个执行线程,Stream groupings定义如何将元组从一组任务发送到另外一组任务。
      7.works
      Topologies execute across one or more worker processes. Each worker process is a physical JVM and executes a subset of all the tasks for the topology. 
 2、storm配置对应的topology

 

 2、参考文献

http://storm.apache.org/releases/2.0.0-SNAPSHOT/Concepts.html

http://storm.apache.org/releases/2.0.0-SNAPSHOT/Understanding-the-parallelism-of-a-Storm-topology.html

相关文章
相关标签/搜索