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

相關文章
相關標籤/搜索