Having more tasks than executors is only helpful, if you want to change
the parallelism of a spout or bolt during runtime (by using command
"storm rebalance"). If you do not want to change parallelism there is no
advantage in having more tasks than executors.

-Matthias

On 07/30/2015 10:24 AM, 鄢来琼 wrote:
> 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
> 
>  
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to