-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-12705][hive] Allow user to specify the Hive version in use #8694
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
Conversation
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
|
cc @bowenli86 @xuefuz @zjuwangg please take a look, thanks. |
...nnector-hive/src/main/java/org/apache/flink/batch/connectors/hive/HiveTableOutputFormat.java
Outdated
Show resolved
Hide resolved
...tors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java
Show resolved
Hide resolved
...ive/src/main/java/org/apache/flink/table/catalog/hive/client/HiveMetastoreClientWrapper.java
Show resolved
Hide resolved
...-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/client/HiveShimLoader.java
Outdated
Show resolved
Hide resolved
...ive/src/main/java/org/apache/flink/table/catalog/hive/descriptors/HiveCatalogDescriptor.java
Show resolved
Hide resolved
...l-client/src/test/java/org/apache/flink/table/client/gateway/local/ExecutionContextTest.java
Outdated
Show resolved
Hide resolved
| return new HiveCatalog(catalogName, null, createHiveConf(), null); | ||
| } | ||
|
|
||
| public static HiveCatalog createHiveCatalog(String name, Map<String, String> properties) { |
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.
minor: can we combine this util and the above one? We may have a bit too many utils to create a HiveCatalog :) BTW, I think it can just take a hive version and let callers decide and get whichever version it wants to use
2c5be2b to
5050a27
Compare
|
@bowenli86 thanks for your comments. Please take another look. |
bowenli86
left a comment
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.
LGTM, will merge tomorrow
| super(catalogName, defaultDatabase == null ? DEFAULT_DB : defaultDatabase); | ||
|
|
||
| this.hiveConf = hiveConf == null ? createHiveConf(null) : hiveConf; | ||
| checkArgument(!StringUtils.isNullOrWhitespaceOnly(hiveVersion), "hiveVersion cannot be empty"); |
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.
| checkArgument(!StringUtils.isNullOrWhitespaceOnly(hiveVersion), "hiveVersion cannot be empty"); | |
| checkArgument(!StringUtils.isNullOrWhitespaceOnly(hiveVersion), "hiveVersion cannot be null or empty"); |
| public HiveMetastoreClientWrapper(HiveConf hiveConf) { | ||
| public HiveMetastoreClientWrapper(HiveConf hiveConf, String hiveVersion) { | ||
| this.hiveConf = Preconditions.checkNotNull(hiveConf, "HiveConf cannot be null"); | ||
| checkArgument(!StringUtils.isNullOrWhitespaceOnly(hiveVersion), "hiveVersion cannot be empty"); |
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.
| checkArgument(!StringUtils.isNullOrWhitespaceOnly(hiveVersion), "hiveVersion cannot be empty"); | |
| checkArgument(!StringUtils.isNullOrWhitespaceOnly(hiveVersion), "hiveVersion cannot be null or empty"); |
xuefuz
left a comment
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.
LGTM now.
This PR allows users to specify hive version in the yaml file. This closes apache#8694.
What is the purpose of the change
To allow user to specify hive version in the yaml file.
Brief change log
HiveVersionInfo.Verifying this change
Added unit test.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation