Using compact case class pattern matching syntax to simplify code in DAGScheduler.processEvent