executor tab /job tasks issue
<p>here is my spark job executor tab on spark UI, not sure why there are so many tasks on one executor only, can anybody explain please.</p>

<p><a href="https://i.stack.imgur.com/ZxKKe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZxKKe.png" alt="enter image description here"></a></p>

<p>Also, in the below picture why are there so many differences in the number of tasks created 17/17,20/20 etc, I can use proper number of cores if I know how many same number of tasks are being created 
<a href="https://i.stack.imgur.com/DmD6D.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DmD6D.png" alt="enter image description here"></a>
Please advice</p>