-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23510][SQL] Support Hive 2.2 and Hive 2.3 metastore #20668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1146,3 +1146,25 @@ private[client] class Shim_v2_1 extends Shim_v2_0 { | |
| alterPartitionsMethod.invoke(hive, tableName, newParts, environmentContextInAlterTable) | ||
| } | ||
| } | ||
|
|
||
| private[client] class Shim_v2_2 extends Shim_v2_1 { | ||
|
|
||
| } | ||
|
||
|
|
||
| private[client] class Shim_v2_3 extends Shim_v2_2 { | ||
|
|
||
| val environmentContext = new EnvironmentContext() | ||
| environmentContext.putToProperties("DO_NOT_UPDATE_STATS", "true") | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Otherwise will throw more see: |
||
|
|
||
| private lazy val alterPartitionsMethod = | ||
| findMethod( | ||
| classOf[Hive], | ||
| "alterPartitions", | ||
| classOf[String], | ||
| classOf[JList[Partition]], | ||
| classOf[EnvironmentContext]) | ||
|
|
||
| override def alterPartitions(hive: Hive, tableName: String, newParts: JList[Partition]): Unit = { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we do not add
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| alterPartitionsMethod.invoke(hive, tableName, newParts, environmentContext) | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -110,7 +110,8 @@ class VersionsSuite extends SparkFunSuite with Logging { | |
| assert(getNestedMessages(e) contains "Unknown column 'A0.OWNER_NAME' in 'field list'") | ||
| } | ||
|
|
||
| private val versions = Seq("0.12", "0.13", "0.14", "1.0", "1.1", "1.2", "2.0", "2.1") | ||
| private val versions = | ||
| Seq("0.12", "0.13", "0.14", "1.0", "1.1", "1.2", "2.0", "2.1", "2.2", "2.3") | ||
|
|
||
| private var client: HiveClient = null | ||
|
|
||
|
|
@@ -125,7 +126,7 @@ class VersionsSuite extends SparkFunSuite with Logging { | |
| // Hive changed the default of datanucleus.schema.autoCreateAll from true to false and | ||
| // hive.metastore.schema.verification from false to true since 2.0 | ||
| // For details, see the JIRA HIVE-6113 and HIVE-12463 | ||
| if (version == "2.0" || version == "2.1") { | ||
| if (version.split("\\.").head.toInt > 1) { | ||
|
||
| hadoopConf.set("datanucleus.schema.autoCreateAll", "true") | ||
| hadoopConf.set("hive.metastore.schema.verification", "false") | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
HIVE_STATS_JDBC_TIMEOUTfrom Hive 2.0.0 ,more see: https://issues.apache.org/jira/browse/HIVE-12164
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we also support all the previous versions