Github user NiharS commented on a diff in the pull request: https://github.com/apache/spark/pull/22192#discussion_r216209462 --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala --- @@ -240,6 +240,19 @@ private[spark] object Utils extends Logging { // scalastyle:on classforname } + /** + * Run a segment of code using a different context class loader in the current thread + */ + def withContextClassLoader[T](ctxClassLoader: ClassLoader)(fn: => T): T = { + val oldClassLoader = getContextOrSparkClassLoader --- End diff -- Originally thought it might be a better idea since the spark executor uses that method when it runs but now that you mention it it could potentially change the behavior...I'll change it back
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org