Hey Mingfei,

I didn't notice this before. But here, you should have a single case class for each function in SparkListener. That case class should wrap any of the relevant information needed to pass onto the listener.

So there should be case classes:

StageCompleted
StageSubmitted
TaskEnd
JobStart
JobEnd

And each class should wrap the necessary information to pass to the Listener.