title: Spark local mode: How to query the number of executor slots?
body: <p>I'm following tutorial <a href="https://youtu.be/K14plpZgy_c" rel="nofollow noreferrer">Using Apache Spark 2.0 to Analyze the City of San Francisco's Open Data</a> where it's claimed that the "local mode" Spark cluster available in Databricks "Community Edition" provides you with 3 executor slots. (So 3 Tasks should be able to run concurrently.)</p>
  
  <p>However, when I look at the "Event Timeline" visualization for job stages with multiple tasks in my own notebook on Databricks  "Community Edition", it looks like up to 8 tasks were running concurrently:</p>
  
  <p><a href="https://i.stack.imgur.com/o1cPu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o1cPu.png" alt="Event timeline in Spark UI, with up to 8 tasks executing concurrently"></a></p>
  
  <p><strong>Is there a way to query the number of executor slots</strong> from PySpark or from a Databricks notebook? Or can I directly see the number in the Spark UI somewhere?</p>