Github user yaooqinn commented on a diff in the pull request:
https://github.com/apache/spark/pull/20145#discussion_r159585279
--- Diff:
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveUtilsSuite.scala ---
@@ -42,4 +47,29 @@ class HiveUtilsSuite extends QueryTest with SQLTestUtils
with TestHiveSingleton
assert(hiveConf("foo") === "bar")
}
}
+
+ test("ChildFirstURLClassLoader's parent is null") {
+ val conf = new SparkConf
+ val contextClassLoader = Thread.currentThread().getContextClassLoader
+ val loader = new FakeChildFirstURLClassLoader(Array(),
contextClassLoader)
+ Thread.currentThread().setContextClassLoader(loader)
+ intercept[IllegalArgumentException](
+ HiveUtils.newClientForMetadata(conf,
SparkHadoopUtil.newConfiguration(conf)))
+ Thread.currentThread().setContextClassLoader(contextClassLoader)
--- End diff --
ok
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]