While I was trying to execute a job using spark-submit, I discover a
scala.MatchError at runtime... a DriverStateChanged.FAILED message was send
to an actor, and the match statement used was not taking that value into
account.

When I inspected that DriverStateChange.scala file I discovered that it's a
scala enumeration; if a sealed trait and case objects would have used, the
compiler would have refused to compile spark until that match statement
would have covered all possible values.

As a scala developer I prefer to catch that kind of errors at compile time
and I would like to understand why a scala enumeration has been used
instead of a sealed trait + case object. If changing that to a sealed (and
possible others) keeps binary compatibility, would that kind of PR be
welcomed?

Kind regards,

Luis

Reply via email to