美文网首页
strom原理

strom原理

作者: lmem | 来源:发表于2016-12-21 21:19 被阅读40次

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

1.三个组成部分

worker 是topology 的一个子集
A worker process executes a subset of a topology
**worker 属于特定topology **
A worker process belongs to a specific topology and may run one or more executors for one or more components (spouts or bolts) of this topology.
运行的topology 包含运行在很多机器上的进程
A running topology consists of many such processes running on many machines within a Storm cluster.
每个bolt或者spout执行很多个task
each spout or bolt that you implement in your code executes as many tasks across the cluster
一个task就是一个组件(spout or bolt).
threads 数小于等于task数目 #threads ≤ #tasks
. By default, the number of tasks is set to be the same as the number of executors, i.e. Storm will run one task per thread.

Paste_Image.png

2.

you can configure not only the number of executors but also the number of worker processes and the number of tasks of a Storm topology. We will specifically call out when "parallelism" is used in the normal, narrow definition of Storm.

3.设置并行度

BlueSpout sends its output to GreenBolt, which in turns sends its own output to YellowBolt
.


Paste_Image.png
Config conf = new Config();
conf.setNumWorkers(2); // use two worker processes

topologyBuilder.setSpout("blue-spout", new BlueSpout(), 2); // set parallelism hint to 2

topologyBuilder.setBolt("green-bolt", new GreenBolt(), 2)
               .setNumTasks(4)
               .shuffleGrouping("blue-spout");

topologyBuilder.setBolt("yellow-bolt", new YellowBolt(), 6)
               .shuffleGrouping("green-bolt");

StormSubmitter.submitTopology(
        "mytopology",
        conf,
        topologyBuilder.createTopology()
    );

相关文章

  • strom原理

    http://storm.apache.org/releases/current/Understanding-th...

  • Storm部署与运行

    环境配置 Strom 下载 首先从官网下载Strom压缩包,这里以最新的Strom1.2.2作为演示。 解压到/u...

  • 流式计算的代表:Storm,Flink,Spark Stream

    流式计算的代表:Storm,Flink,Spark Streaming Strom 1.Strom的主从架构 ni...

  • flink spark strom 反压机制

    strom 反压 实现原理 Storm 是通过监控 Bolt 中的接收队列负载情况,如果超过高水位值就会将反压信息...

  • Strom入门系列之二:Storm 简单应用实例

    Strom入门系列之二:storm简单应用实例 上一篇文章概要的介绍的 storm 的一些知识,以及相关工作原理。...

  • Strom安装

    安装版本:apache-storm-1.1.0.tar 1.准备工作(1)安装jdk1.8(2)安装zookeep...

  • Strom自学

    简介:strom能实现高频数据和大规模数据的实时处理 Strom和hadoop的区别: H:大规模的离线批处理;...

  • The wolven strom

    因为《巫师三》这个游戏我喜欢上了The wolven strom这首充满感情,旋律优美的歌曲。推荐大家去搜来听听...

  • 奇妙能力

    I saw the strom in the desert Saw the ocean kiss the shar...

  • 大数据Storm相比于Spark、Hadoop有哪些优势(摘录)

    一、可能很多初学大数据的伙伴不知道strom是什么,先给大家介绍一下strom: 分布式实时计算系统,storm对...

网友评论

      本文标题:strom原理

      本文链接:https://www.haomeiwen.com/subject/guzqvttx.html