If two task is run in one executor, both tasks are run in serial mode, not 
parallel mode.

Tasks in serial mode is faster than parallel mode?

发件人: 鄢来琼
发送时间: Thursday, July 30, 2015 3:51 PM
收件人: '[email protected]'
主题: The relation between executor and Task

Hi ALL,


An executor is a thread that is spawned by a worker process. It may run one or 
more tasks for the same component (spout or bolt).

A task performs the actual data processing ― each spout or bolt that you 
implement in your code executes as many tasks across the cluster. The number of 
tasks for a component is always the same throughout the lifetime of a topology, 
but the number of executors (threads) for a component can change over time. 
This means that the following condition holds true: #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.
http://storm.apache.org/documentation/Understanding-the-parallelism-of-a-Storm-topology.html

According the above, the executor run one or more spout or bolt.
Could you tell me the life cycle of executor and spout?
Could you tell me a use case about executor has more than one task.
When the executor need more than one task?

Thanks a lot.

Regards,

Peter

Reply via email to