Skip to content

Commit bb418bb

Browse files
committed
Remove hive-staged-releases
1 parent 86df2cc commit bb418bb

File tree

6 files changed

+12
-25
lines changed

6 files changed

+12
-25
lines changed

pom.xml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -296,17 +296,6 @@
296296
<enabled>false</enabled>
297297
</snapshots>
298298
</repository>
299-
<repository>
300-
<id>staged</id>
301-
<name>hive-staged-releases</name>
302-
<url>https://repository.apache.org/content/repositories/staging/</url>
303-
<releases>
304-
<enabled>true</enabled>
305-
</releases>
306-
<snapshots>
307-
<enabled>true</enabled>
308-
</snapshots>
309-
</repository>
310299
</repositories>
311300
<pluginRepositories>
312301
<pluginRepository>

project/SparkBuild.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,6 @@ object SparkBuild extends PomBuild {
271271
DefaultMavenRepository,
272272
Resolver.mavenLocal,
273273
Resolver.file("ivyLocal", file(Path.userHome.absolutePath + "/.ivy2/local"))(Resolver.ivyStylePatterns)
274-
) ++ Seq(
275-
"hive-staged-releases-mirror" at "https://repository.apache.org/content/repositories/staging/",
276-
Resolver.file("local", file(Path.userHome.absolutePath + "/.ivy2/local"))(Resolver.ivyStylePatterns)
277274
),
278275
externalResolvers := resolvers.value,
279276
otherResolvers := SbtPomKeys.mvnLocalRepository(dotM2 => Seq(Resolver.file("dotM2", dotM2))).value,

sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,8 +2748,7 @@ object SQLConf {
27482748
.stringConf
27492749
.createWithDefault(
27502750
sys.env.getOrElse("DEFAULT_ARTIFACT_REPOSITORY",
2751-
"https://maven-central.storage-download.googleapis.com/maven2/," +
2752-
"https://repository.apache.org/content/repositories/staging/"))
2751+
"https://maven-central.storage-download.googleapis.com/maven2/"))
27532752

27542753
val LEGACY_FROM_DAYTIME_STRING =
27552754
buildConf("spark.sql.legacy.fromDayTimeString.enabled")

sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3724,20 +3724,21 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
37243724

37253725
test("SPARK-33084: Add jar support Ivy URI in SQL") {
37263726
val sc = spark.sparkContext
3727+
val hiveVersion = "2.3.8"
37273728
// default transitive=false, only download specified jar
3728-
sql("ADD JAR ivy://org.apache.hive.hcatalog:hive-hcatalog-core:2.3.7")
3729+
sql(s"ADD JAR ivy://org.apache.hive.hcatalog:hive-hcatalog-core:$hiveVersion")
37293730
assert(sc.listJars()
3730-
.exists(_.contains("org.apache.hive.hcatalog_hive-hcatalog-core-2.3.7.jar")))
3731+
.exists(_.contains(s"org.apache.hive.hcatalog_hive-hcatalog-core-$hiveVersion.jar")))
37313732

37323733
// test download ivy URL jar return multiple jars
37333734
sql("ADD JAR ivy://org.scala-js:scalajs-test-interface_2.12:1.2.0?transitive=true")
37343735
assert(sc.listJars().exists(_.contains("scalajs-library_2.12")))
37353736
assert(sc.listJars().exists(_.contains("scalajs-test-interface_2.12")))
37363737

3737-
sql("ADD JAR ivy://org.apache.hive:hive-contrib:2.3.7" +
3738+
sql(s"ADD JAR ivy://org.apache.hive:hive-contrib:$hiveVersion" +
37383739
"?exclude=org.pentaho:pentaho-aggdesigner-algorithm&transitive=true")
3739-
assert(sc.listJars().exists(_.contains("org.apache.hive_hive-contrib-2.3.7.jar")))
3740-
assert(sc.listJars().exists(_.contains("org.apache.hive_hive-exec-2.3.7.jar")))
3740+
assert(sc.listJars().exists(_.contains(s"org.apache.hive_hive-contrib-$hiveVersion.jar")))
3741+
assert(sc.listJars().exists(_.contains(s"org.apache.hive_hive-exec-$hiveVersion.jar")))
37413742
assert(!sc.listJars().exists(_.contains("org.pentaho.pentaho_aggdesigner-algorithm")))
37423743
}
37433744

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import org.apache.spark.sql.catalyst.expressions.Cast
3434
import org.apache.spark.sql.catalyst.parser.ParseException
3535
import org.apache.spark.sql.catalyst.plans.logical.Project
3636
import org.apache.spark.sql.execution.joins.BroadcastNestedLoopJoinExec
37+
import org.apache.spark.sql.hive.HiveUtils.{builtinHiveVersion => hiveVersion}
3738
import org.apache.spark.sql.hive.test.{HiveTestJars, TestHive}
3839
import org.apache.spark.sql.hive.test.TestHive._
3940
import org.apache.spark.sql.internal.SQLConf
@@ -1223,17 +1224,17 @@ class HiveQuerySuite extends HiveComparisonTest with SQLTestUtils with BeforeAnd
12231224
test("SPARK-33084: Add jar support Ivy URI in SQL") {
12241225
val testData = TestHive.getHiveFile("data/files/sample.json").toURI
12251226
withTable("t") {
1226-
sql("ADD JAR ivy://org.apache.hive.hcatalog:hive-hcatalog-core:2.3.7")
1227+
sql(s"ADD JAR ivy://org.apache.hive.hcatalog:hive-hcatalog-core:$hiveVersion")
12271228
sql(
12281229
"""CREATE TABLE t(a string, b string)
12291230
|ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'""".stripMargin)
12301231
sql(s"""LOAD DATA LOCAL INPATH "$testData" INTO TABLE t""")
12311232
sql("SELECT * FROM src JOIN t on src.key = t.a")
12321233
assert(sql("LIST JARS").filter(_.getString(0).contains(
1233-
"org.apache.hive.hcatalog_hive-hcatalog-core-2.3.7.jar")).count() > 0)
1234+
s"org.apache.hive.hcatalog_hive-hcatalog-core-$hiveVersion.jar")).count() > 0)
12341235
assert(sql("LIST JAR").
12351236
filter(_.getString(0).contains(
1236-
"org.apache.hive.hcatalog_hive-hcatalog-core-2.3.7.jar")).count() > 0)
1237+
s"org.apache.hive.hcatalog_hive-hcatalog-core-$hiveVersion.jar")).count() > 0)
12371238
}
12381239
}
12391240
}

sql/hive/src/test/scala/org/apache/spark/sql/hive/test/TestHive.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ private[sql] class TestHiveSessionStateBuilder(
666666
}
667667

668668
private[hive] object HiveTestJars {
669-
private val repository = SQLConf.ADDITIONAL_REMOTE_REPOSITORIES.defaultValueString.split(",").last
669+
private val repository = SQLConf.ADDITIONAL_REMOTE_REPOSITORIES.defaultValueString.split(",")(0)
670670
private val hiveTestJarsDir = Utils.createTempDir()
671671

672672
def getHiveContribJar(version: String = HiveUtils.builtinHiveVersion): File =

0 commit comments

Comments
 (0)