There is slightly nicer way to write this that avoids having to create an intermediate set:

    listener.executorToTasksActive.get(a.toString).map(l => l.size).getOrElse(0).toString

Calling `map` on an `Option` simply returns `None` if the option is not defined, so this works in that case. The way you have it is fine also, just wanted to let you know.