wangyum commented on a change in pull request #25690:
[SPARK-27831][FOLLOW-UP][SQL][TEST][test-hadoop3.2] Move Hive test jars to
local file
URL: https://github.com/apache/spark/pull/25690#discussion_r324422737
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/test/TestHive.scala
##########
@@ -647,3 +647,29 @@ private[sql] class TestHiveSessionStateBuilder(
override protected def newBuilder: NewBuilder = new
TestHiveSessionStateBuilder(_, _)
}
+
+private[hive] object HiveTestJars {
+ private val repository =
"https://repository.apache.org/content/repositories/releases/"
+
+ def getHiveContribJar: File =
+ getJarFromUrl(s"${repository}org/apache/hive/hive-contrib/" +
+
s"${HiveUtils.builtinHiveVersion}/hive-contrib-${HiveUtils.builtinHiveVersion}.jar")
+ def getHiveHcatalogCoreJar: File =
+ getJarFromUrl(s"${repository}org/apache/hive/hcatalog/hive-hcatalog-core/"
+
+
s"${HiveUtils.builtinHiveVersion}/hive-hcatalog-core-${HiveUtils.builtinHiveVersion}.jar")
+
+ private def getJarFromUrl(urlString: String): File = {
+ val fileName = urlString.split("/").last
+ val hiveTestJarsDir = new File("/tmp/test-spark/hiveTestJars")
Review comment:
Changed it to `Utils.createTempDir()`: Create a temporary directory inside
the given parent directory. The directory will be automatically deleted when
the VM shuts down.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]