Storm Configuration Graphic Parsing

Source: Internet
Author: User

Storm Configuration Graphic Parsing

Reference reading: http://www.xiaofateng.com/?p=959

     ==============================     |     Sample-topology |  |   ------------------------  |  Task 1 Task 2 Task 3 |   |  Worker Process 1 |     |  T1 T2 T3 |           |  +--------+ |    |  Spout = Bolt and Bolt | | +------+  |  +----+ | | |  Parallelism parallelism Parallelism |  | |  T3 | | |  T2 | | |    |  hint=2 hint=2 hint=6 | | +------+  |  +----+ | |     |  |           | |  +----+ | |    |  Combined parallelism = 2 + 2 + 6 = 10 | | +------+  | |  T2 | | |     |  |  | |  T3 | |  +----+ | |  |  Each of the 2 worker processes'll spawn 10/2=5 threads | |  +------+  +--------+ |     |  |                      |  |    |  T1:parallelism hint = initial executors | |  +------+  +--------+ |     |  |  | |  T3 |   |  T1 | |    |     T2:the T2 Bolt is configured to use 2 executors and four tasks.  | |  +------+  +--------+ |        | ForThis reason each executor runs the tasks for this bolt.  |     ------------------------  |                            |     |  |    ------------------------  |     Config conf = new config ();  |   |  Worker Process 2 |     |  |           |  +--------+ |    |  Run as 2 workers on 2 supervisors | | +------+  |  +----+ | |    |     Conf.setnumworkers (2);  |  | |  T3 | | |  T2 | | |     |  | | +------+  |  +----+ | |    |  T1:2 Executors for spout |           | |  +----+ | |    |     Topologybuilder.setspout ("T1-spout", New T1spout (), 2);  | | +------+  | |  T2 | | |     |  |  | |  T3 | |  +----+ | |    |  T2:2 executors for Bolts with total 4 tasks | |  +------+  +--------+ |    |  Topologybuilder.setbolt ("T2-bolt", New T2bolt (), 2) |                      |  |        |     . Setnumtasks (4). shufflegrouping ("T1-spout");  | |  +------+  +--------+ |    |  T3:6 Executors for Bolts (default 1 task for 1 executor) |  | |  T3 |   |  T1 | |    | TopologyBuilder.setbolt ("T3-bolt", New T3bolt (), 6). Shufflegrouping ("T2-bolt");  | |  +------+  +--------+ |     |  |    ------------------------  |     Stormsubmitter.submittopology ("Sample-topology", conf, Topologybuilder.createtopology ()); ==============================

Description

A worker process generates n threads (executor), so the degree of parallelism (parallelism) is the number of all threads. Setnumworkers

A task is the work queue that the thread executes, and the number of tasks for the thread describes the throughput capacity of the thread. The individual tasks of a thread are not concurrent. Setnumtasks

A thread (executor) is the context in which the task is performed.

Refer to understanding the meanings of each configuration.




Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Storm Configuration Graphic Parsing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.