Skip to content
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

Simplify Hive metastore creation and use #9482

Merged
merged 18 commits into from
Feb 7, 2022

Conversation

dain
Copy link
Member

@dain dain commented Oct 3, 2021

Description

  • Delay creation of actual ConnectorMetadata actually until used
  • Provide ConnectorSession during creation of ConnectorMetadata
  • Delay HiveMetastore creation until ConnectorIdentity is available from ConnectorSession
  • Capture ConnectorIdentity curing metastore creation, and use this instead of passing to every method
  • Redesign recording and caching metastore wrapper to make this possible

General information

Is this change a fix, improvement, new feature, refactoring, or other?
refactoring

Is this a change to the core query engine, a connector, client library, or the
SPI interfaces (be specific)?
engine and spi

How would you describe this change to a non-technical end user or system
administrator?
N/A

Documentation

(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

( ) No release notes entries required.
( ) Release notes entries required with the following suggested text:

# SPI
* Add `ConnectorSession` to `Connector` `getMetadata` method. The former signature is deprecated and should be updated. ({issue}`9482`)

@dain dain requested a review from electrum October 3, 2021 08:15
@cla-bot cla-bot bot added the cla-signed label Oct 3, 2021
@dain dain force-pushed the hive-metastore-factory branch 4 times, most recently from 9b2abbd to 1081473 Compare October 3, 2021 23:12
@dain dain changed the title [WIP] Simplify Hive metastore creation and use Simplify Hive metastore creation and use Oct 4, 2021
@dain dain force-pushed the hive-metastore-factory branch from 1081473 to 71ebfbc Compare November 14, 2021 00:48
@dain dain force-pushed the hive-metastore-factory branch from 71ebfbc to 7f58327 Compare January 17, 2022 05:03
@dain dain force-pushed the hive-metastore-factory branch 2 times, most recently from aff40db to 89c818a Compare January 20, 2022 04:12
@dain dain force-pushed the hive-metastore-factory branch 3 times, most recently from 805dd2c to ffdb906 Compare February 5, 2022 00:49
@electrum
Copy link
Member

electrum commented Feb 6, 2022

Typo "Guild" in commit description

@dain dain force-pushed the hive-metastore-factory branch 3 times, most recently from 24a9cf7 to ea01a7e Compare February 6, 2022 21:53
dain added 10 commits February 6, 2022 14:06
Instead, the HiveMetastoreClosure is fetched from the
current SemiTransactionalHiveMetastore. This ensures that both are
using the same underlying metastore objects.
Split out the recording state from RecordingHiveMetastore, so recording
can be shared by multiple HiveMetastore instances.
Replace chained Guild binding annotations ForRecordingHiveMetastore and
ForCachingHiveMetastore with generic module to apply decorators and
shared caching.
Convert RecordingHiveMetastore to a decorator.
Add SharedHiveMetastoreCache and manually apply during Metastore
creation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants