explicitly visit spark env 3

This commit is contained in:
Kent Yao 2018-05-16 18:58:23 +08:00
parent 7809facd12
commit 52c5efb9ed

View File

@ -79,7 +79,7 @@ object KyuubiSparkUtil extends Logging {
val classLoader = new KyuubiFirstClassLoader(Array(url), getContextOrSparkClassLoader())
val envCls = classLoader.loadClass("org.apache.spark.SparkEnv", true)
val envObj = classLoader.loadClass("org.apache.spark.SparkEnv$", true)
ReflectUtils.invokeStaticMethod(envObj, "set", Seq(envCls), null)
ReflectUtils.invokeStaticMethod(envCls, "set", Seq(envCls), null)
classLoader
}