Instead of having two state tracking variables (allExecutors and totalCores), could we not just have a single Map[String, Int] where the key is the executor id and the value would be # of cores? Something like:

```scala
  val allExecutors = Map.empty[String, Int].withDefaultValue(0)
```