Class Note--strom concurrency model

Source: Internet
Author: User

Strom concurrency Model:How does the topology work? (Can be compared with mapreduce)First Floor: ClusterSecond Layer: Supervisor (host, node, machine)Third Floor: worker (process) Fourth Floor: Executor (thread) Layer Fifth: Task (objects of threads, such as spout and blot)//topology:n workers== per ==>1 excutor=>1 task//At this point, it's the same as the MapReduce one.
Topology Code

conf.setnumworkers ( 2 )//Processtopologybuilder.setspout ("Blue-spout", New Blue (), 2 )//threadTopologybuilder.setbolt ("Green-spot", New Green (), 2 ). Setnumtasks (4). Shufflegrouping ("blue-sqout")//Thread, ObjectTopologybuilder.serbolt ("Yellow-sqout", New Yellow (), 6 ). Shufflegrouping ("Green-bolt")

Summary:The worker first set how many is topology inside how many, executor degree of parallelism there is how many is set how many, task if not set that is a executor corresponds to a task, If there is a write that is the task count is the number of tasks set divided by executor number to decide. "Note" Hadoop's mapreduce concurrency model, a job with a lot of tasks, then there are 1000 map, there are 100 reduce, a cluster has a lot of nodes, for example, there are 500 nodes, then this time, Is that I have some map task on each node, some reduce task, this time my 1000 map to each machine up and running, each maptask is a process, each reduce task is also a process, Hadoop its concurrency model is very simple, two levels, it has a lot of machines, each machine has a lot of task processes, the task process inside the run is our MapReduce function

From for notes (Wiz)

Class Note--strom concurrency model

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.