Storm Streams

来源:互联网 发布:咸鱼淘宝二手网 编辑:程序博客网 时间:2024/05/13 16:55

Streams

The stream is the core abstraction in Storm. A stream is an unbounded(无限的) sequence of tuples that is processed and created in parallel(平行的) in a distributed fashion(分布式方式). 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 tuples.

Every stream is given an id when declared. Since single-stream spouts and bolts are so common, OutputFieldsDeclarer has convenience methods for declaring a single stream without specifying an id. In this case, the stream is given the default id of "default".

Resources:

  • Tuple: streams are composed of tuples
  • OutputFieldsDeclarer: used to declare streams and their schemas
  • Serialization: Information about Storm's dynamic typing of tuples and declaring custom serializations
原创粉丝点击