Skip to content

Commit fc9f735

Browse files
committed
Upgrade built-in Hive to 2.3.8
1 parent 73412ff commit fc9f735

File tree

14 files changed

+59
-44
lines changed

14 files changed

+59
-44
lines changed

dev/deps/spark-deps-hadoop-2.7-hive-2.3

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,21 @@ hadoop-yarn-client/2.7.4//hadoop-yarn-client-2.7.4.jar
8080
hadoop-yarn-common/2.7.4//hadoop-yarn-common-2.7.4.jar
8181
hadoop-yarn-server-common/2.7.4//hadoop-yarn-server-common-2.7.4.jar
8282
hadoop-yarn-server-web-proxy/2.7.4//hadoop-yarn-server-web-proxy-2.7.4.jar
83-
hive-beeline/2.3.7//hive-beeline-2.3.7.jar
84-
hive-cli/2.3.7//hive-cli-2.3.7.jar
85-
hive-common/2.3.7//hive-common-2.3.7.jar
86-
hive-exec/2.3.7/core/hive-exec-2.3.7-core.jar
87-
hive-jdbc/2.3.7//hive-jdbc-2.3.7.jar
88-
hive-llap-common/2.3.7//hive-llap-common-2.3.7.jar
89-
hive-metastore/2.3.7//hive-metastore-2.3.7.jar
90-
hive-serde/2.3.7//hive-serde-2.3.7.jar
83+
hive-beeline/2.3.8//hive-beeline-2.3.8.jar
84+
hive-cli/2.3.8//hive-cli-2.3.8.jar
85+
hive-common/2.3.8//hive-common-2.3.8.jar
86+
hive-exec/2.3.8/core/hive-exec-2.3.8-core.jar
87+
hive-jdbc/2.3.8//hive-jdbc-2.3.8.jar
88+
hive-llap-common/2.3.8//hive-llap-common-2.3.8.jar
89+
hive-metastore/2.3.8//hive-metastore-2.3.8.jar
90+
hive-serde/2.3.8//hive-serde-2.3.8.jar
9191
hive-service-rpc/3.1.2//hive-service-rpc-3.1.2.jar
92-
hive-shims-0.23/2.3.7//hive-shims-0.23-2.3.7.jar
93-
hive-shims-common/2.3.7//hive-shims-common-2.3.7.jar
94-
hive-shims-scheduler/2.3.7//hive-shims-scheduler-2.3.7.jar
95-
hive-shims/2.3.7//hive-shims-2.3.7.jar
92+
hive-shims-0.23/2.3.8//hive-shims-0.23-2.3.8.jar
93+
hive-shims-common/2.3.8//hive-shims-common-2.3.8.jar
94+
hive-shims-scheduler/2.3.8//hive-shims-scheduler-2.3.8.jar
95+
hive-shims/2.3.8//hive-shims-2.3.8.jar
9696
hive-storage-api/2.7.2//hive-storage-api-2.7.2.jar
97-
hive-vector-code-gen/2.3.7//hive-vector-code-gen-2.3.7.jar
97+
hive-vector-code-gen/2.3.8//hive-vector-code-gen-2.3.8.jar
9898
hk2-api/2.6.1//hk2-api-2.6.1.jar
9999
hk2-locator/2.6.1//hk2-locator-2.6.1.jar
100100
hk2-utils/2.6.1//hk2-utils-2.6.1.jar

dev/deps/spark-deps-hadoop-3.2-hive-2.3

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,21 @@ hadoop-yarn-common/3.2.0//hadoop-yarn-common-3.2.0.jar
7979
hadoop-yarn-registry/3.2.0//hadoop-yarn-registry-3.2.0.jar
8080
hadoop-yarn-server-common/3.2.0//hadoop-yarn-server-common-3.2.0.jar
8181
hadoop-yarn-server-web-proxy/3.2.0//hadoop-yarn-server-web-proxy-3.2.0.jar
82-
hive-beeline/2.3.7//hive-beeline-2.3.7.jar
83-
hive-cli/2.3.7//hive-cli-2.3.7.jar
84-
hive-common/2.3.7//hive-common-2.3.7.jar
85-
hive-exec/2.3.7/core/hive-exec-2.3.7-core.jar
86-
hive-jdbc/2.3.7//hive-jdbc-2.3.7.jar
87-
hive-llap-common/2.3.7//hive-llap-common-2.3.7.jar
88-
hive-metastore/2.3.7//hive-metastore-2.3.7.jar
89-
hive-serde/2.3.7//hive-serde-2.3.7.jar
82+
hive-beeline/2.3.8//hive-beeline-2.3.8.jar
83+
hive-cli/2.3.8//hive-cli-2.3.8.jar
84+
hive-common/2.3.8//hive-common-2.3.8.jar
85+
hive-exec/2.3.8/core/hive-exec-2.3.8-core.jar
86+
hive-jdbc/2.3.8//hive-jdbc-2.3.8.jar
87+
hive-llap-common/2.3.8//hive-llap-common-2.3.8.jar
88+
hive-metastore/2.3.8//hive-metastore-2.3.8.jar
89+
hive-serde/2.3.8//hive-serde-2.3.8.jar
9090
hive-service-rpc/3.1.2//hive-service-rpc-3.1.2.jar
91-
hive-shims-0.23/2.3.7//hive-shims-0.23-2.3.7.jar
92-
hive-shims-common/2.3.7//hive-shims-common-2.3.7.jar
93-
hive-shims-scheduler/2.3.7//hive-shims-scheduler-2.3.7.jar
94-
hive-shims/2.3.7//hive-shims-2.3.7.jar
91+
hive-shims-0.23/2.3.8//hive-shims-0.23-2.3.8.jar
92+
hive-shims-common/2.3.8//hive-shims-common-2.3.8.jar
93+
hive-shims-scheduler/2.3.8//hive-shims-scheduler-2.3.8.jar
94+
hive-shims/2.3.8//hive-shims-2.3.8.jar
9595
hive-storage-api/2.7.2//hive-storage-api-2.7.2.jar
96-
hive-vector-code-gen/2.3.7//hive-vector-code-gen-2.3.7.jar
96+
hive-vector-code-gen/2.3.8//hive-vector-code-gen-2.3.8.jar
9797
hk2-api/2.6.1//hk2-api-2.6.1.jar
9898
hk2-locator/2.6.1//hk2-locator-2.6.1.jar
9999
hk2-utils/2.6.1//hk2-utils-2.6.1.jar

docs/building-spark.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ Example:
8383

8484
To enable Hive integration for Spark SQL along with its JDBC server and CLI,
8585
add the `-Phive` and `-Phive-thriftserver` profiles to your existing build options.
86-
By default Spark will build with Hive 2.3.7.
86+
By default Spark will build with Hive 2.3.8.
8787

88-
# With Hive 2.3.7 support
88+
# With Hive 2.3.8 support
8989
./build/mvn -Pyarn -Phive -Phive-thriftserver -DskipTests clean package
9090

9191
## Packaging without Hadoop Dependencies for YARN

docs/sql-data-sources-hive-tables.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ The following options can be used to configure the version of Hive that is used
127127
<tr><th>Property Name</th><th>Default</th><th>Meaning</th><th>Since Version</th></tr>
128128
<tr>
129129
<td><code>spark.sql.hive.metastore.version</code></td>
130-
<td><code>2.3.7</code></td>
130+
<td><code>2.3.8</code></td>
131131
<td>
132132
Version of the Hive metastore. Available
133-
options are <code>0.12.0</code> through <code>2.3.7</code> and <code>3.0.0</code> through <code>3.1.2</code>.
133+
options are <code>0.12.0</code> through <code>2.3.8</code> and <code>3.0.0</code> through <code>3.1.2</code>.
134134
</td>
135135
<td>1.4.0</td>
136136
</tr>
@@ -142,9 +142,9 @@ The following options can be used to configure the version of Hive that is used
142142
property can be one of three options:
143143
<ol>
144144
<li><code>builtin</code></li>
145-
Use Hive 2.3.7, which is bundled with the Spark assembly when <code>-Phive</code> is
145+
Use Hive 2.3.8, which is bundled with the Spark assembly when <code>-Phive</code> is
146146
enabled. When this option is chosen, <code>spark.sql.hive.metastore.version</code> must be
147-
either <code>2.3.7</code> or not defined.
147+
either <code>2.3.8</code> or not defined.
148148
<li><code>maven</code></li>
149149
Use Hive jars of specified version downloaded from Maven repositories. This configuration
150150
is not generally recommended for production deployments.

docs/sql-migration-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ Python UDF registration is unchanged.
824824
Spark SQL is designed to be compatible with the Hive Metastore, SerDes and UDFs.
825825
Currently, Hive SerDes and UDFs are based on built-in Hive,
826826
and Spark SQL can be connected to different versions of Hive Metastore
827-
(from 0.12.0 to 2.3.7 and 3.0.0 to 3.1.2. Also see [Interacting with Different Versions of Hive Metastore](sql-data-sources-hive-tables.html#interacting-with-different-versions-of-hive-metastore)).
827+
(from 0.12.0 to 2.3.8 and 3.0.0 to 3.1.2. Also see [Interacting with Different Versions of Hive Metastore](sql-data-sources-hive-tables.html#interacting-with-different-versions-of-hive-metastore)).
828828

829829
#### Deploying in Existing Hive Warehouses
830830
{:.no_toc}

pom.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@
128128
<hive.group>org.apache.hive</hive.group>
129129
<hive.classifier>core</hive.classifier>
130130
<!-- Version used in Maven Hive dependency -->
131-
<hive.version>2.3.7</hive.version>
132-
<hive23.version>2.3.7</hive23.version>
131+
<hive.version>2.3.8</hive.version>
132+
<hive23.version>2.3.8</hive23.version>
133133
<!-- Version used for internal directory structure -->
134134
<hive.version.short>2.3</hive.version.short>
135135
<!-- note that this should be compatible with Kafka brokers version 0.10 and up -->
@@ -286,6 +286,17 @@
286286
<enabled>false</enabled>
287287
</snapshots>
288288
</repository>
289+
<repository>
290+
<id>staged</id>
291+
<name>hive-staged-releases</name>
292+
<url>https://repository.apache.org/content/repositories/staging/</url>
293+
<releases>
294+
<enabled>true</enabled>
295+
</releases>
296+
<snapshots>
297+
<enabled>true</enabled>
298+
</snapshots>
299+
</repository>
289300
</repositories>
290301
<pluginRepositories>
291302
<pluginRepository>

project/SparkBuild.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,9 @@ object SparkBuild extends PomBuild {
263263
DefaultMavenRepository,
264264
Resolver.mavenLocal,
265265
Resolver.file("ivyLocal", file(Path.userHome.absolutePath + "/.ivy2/local"))(Resolver.ivyStylePatterns)
266+
) ++ Seq(
267+
"hive-staged-releases-mirror" at "https://repository.apache.org/content/repositories/staging/",
268+
Resolver.file("local", file(Path.userHome.absolutePath + "/.ivy2/local"))(Resolver.ivyStylePatterns)
266269
),
267270
externalResolvers := resolvers.value,
268271
otherResolvers := SbtPomKeys.mvnLocalRepository(dotM2 => Seq(Resolver.file("dotM2", dotM2))).value,

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2669,7 +2669,8 @@ object SQLConf {
26692669
.stringConf
26702670
.createWithDefault(
26712671
sys.env.getOrElse("DEFAULT_ARTIFACT_REPOSITORY",
2672-
"https://maven-central.storage-download.googleapis.com/maven2/"))
2672+
"https://maven-central.storage-download.googleapis.com/maven2/," +
2673+
"https://repository.apache.org/content/repositories/staging/"))
26732674

26742675
val LEGACY_FROM_DAYTIME_STRING =
26752676
buildConf("spark.sql.legacy.fromDayTimeString.enabled")

sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ class HiveThriftBinaryServerSuite extends HiveThriftJdbcTest {
545545
conf += resultSet.getString(1) -> resultSet.getString(2)
546546
}
547547

548-
assert(conf.get(HiveUtils.FAKE_HIVE_VERSION.key) === Some("2.3.7"))
548+
assert(conf.get(HiveUtils.FAKE_HIVE_VERSION.key) === Some("2.3.8"))
549549
}
550550
}
551551

@@ -558,7 +558,7 @@ class HiveThriftBinaryServerSuite extends HiveThriftJdbcTest {
558558
conf += resultSet.getString(1) -> resultSet.getString(2)
559559
}
560560

561-
assert(conf.get(HiveUtils.FAKE_HIVE_VERSION.key) === Some("2.3.7"))
561+
assert(conf.get(HiveUtils.FAKE_HIVE_VERSION.key) === Some("2.3.8"))
562562
}
563563
}
564564

sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private[spark] object HiveUtils extends Logging {
6060

6161
val HIVE_METASTORE_VERSION = buildStaticConf("spark.sql.hive.metastore.version")
6262
.doc("Version of the Hive metastore. Available options are " +
63-
"<code>0.12.0</code> through <code>2.3.7</code> and " +
63+
"<code>0.12.0</code> through <code>2.3.8</code> and " +
6464
"<code>3.0.0</code> through <code>3.1.2</code>.")
6565
.version("1.4.0")
6666
.stringConf

sql/hive/src/main/scala/org/apache/spark/sql/hive/client/IsolatedClientLoader.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ private[hive] object IsolatedClientLoader extends Logging {
9898
case "2.0" | "2.0.0" | "2.0.1" => hive.v2_0
9999
case "2.1" | "2.1.0" | "2.1.1" => hive.v2_1
100100
case "2.2" | "2.2.0" => hive.v2_2
101-
case "2.3" | "2.3.0" | "2.3.1" | "2.3.2" | "2.3.3" | "2.3.4" | "2.3.5" | "2.3.6" | "2.3.7" =>
102-
hive.v2_3
101+
case "2.3" | "2.3.0" | "2.3.1" | "2.3.2" | "2.3.3" | "2.3.4" | "2.3.5" | "2.3.6" | "2.3.7" |
102+
"2.3.8" => hive.v2_3
103103
case "3.0" | "3.0.0" => hive.v3_0
104104
case "3.1" | "3.1.0" | "3.1.1" | "3.1.2" => hive.v3_1
105105
case version =>

sql/hive/src/main/scala/org/apache/spark/sql/hive/client/package.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ package object client {
102102

103103
// Since HIVE-14496, Hive materialized view need calcite-core.
104104
// For spark, only VersionsSuite currently creates a hive materialized view for testing.
105-
case object v2_3 extends HiveVersion("2.3.7",
105+
case object v2_3 extends HiveVersion("2.3.8",
106106
exclusions = Seq("org.apache.calcite:calcite-druid",
107107
"org.apache.calcite.avatica:avatica",
108108
"org.apache.curator:*",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class HiveExternalCatalogVersionsSuite extends SparkSubmitTestUtils {
6060
.map(new File(_)).getOrElse(Utils.createTempDir(namePrefix = "test-spark"))
6161
private val unusedJar = TestUtils.createJarWithClasses(Seq.empty)
6262
val hiveVersion = if (SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_9)) {
63-
"2.3.7"
63+
"2.3.8"
6464
} else {
6565
"1.2.1"
6666
}

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
@@ -668,7 +668,7 @@ private[sql] class TestHiveSessionStateBuilder(
668668
}
669669

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

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

0 commit comments

Comments
 (0)