Access private members in Scala in Spark shell¶
If you ever wanted to use private[spark] members in Spark using the Scala programming language, e.g. toy with org.apache.spark.scheduler.DAGScheduler or similar, you will have to use the following trick in Spark shell - use :paste -raw as described in REPL: support for package definition.
Open spark-shell and execute :paste -raw that allows you to enter any valid Scala code, including package.
The following snippet shows how to access private[spark] member DAGScheduler.RESUBMIT_TIMEOUT: