Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/22192#discussion_r216106874
--- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
@@ -240,6 +240,16 @@ 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(ctxClassLoader: ClassLoader)(fn: => Unit):
Unit = {
--- End diff --
Better to make this method generic (i.e. make the return a parameterized
type `T`).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]