Skip to content

Conversation

@lirui-apache
Copy link
Contributor

What is the purpose of the change

To allow user to specify hive version in the yaml file.

Brief change log

  • Support the "hive-version" property in yaml file.
  • User specified version takes precedence over what's returned by HiveVersionInfo.
  • Code using HiveShim should honor user specified Hive version.

Verifying this change

Added unit test.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? yes
  • If yes, how is the feature documented? docs

@flinkbot
Copy link
Collaborator

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.

Details
The 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 commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@lirui-apache
Copy link
Contributor Author

cc @bowenli86 @xuefuz @zjuwangg please take a look, thanks.

return new HiveCatalog(catalogName, null, createHiveConf(), null);
}

public static HiveCatalog createHiveCatalog(String name, Map<String, String> properties) {
Copy link
Member

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

@lirui-apache
Copy link
Contributor Author

@bowenli86 thanks for your comments. Please take another look.

Copy link
Member

@bowenli86 bowenli86 left a 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");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
checkArgument(!StringUtils.isNullOrWhitespaceOnly(hiveVersion), "hiveVersion cannot be empty");
checkArgument(!StringUtils.isNullOrWhitespaceOnly(hiveVersion), "hiveVersion cannot be null or empty");

Copy link
Contributor

@xuefuz xuefuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now.

@asfgit asfgit closed this in ec383d6 Jun 14, 2019
@lirui-apache lirui-apache deleted the FLINK-12705 branch June 17, 2019 02:52
sjwiesman pushed a commit to sjwiesman/flink that referenced this pull request Jun 26, 2019
This PR allows users to specify hive version in the yaml file.

This closes apache#8694.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants