-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9b2abbd
to
1081473
Compare
1081473
to
71ebfbc
Compare
71ebfbc
to
7f58327
Compare
aff40db
to
89c818a
Compare
805dd2c
to
ffdb906
Compare
Typo "Guild" in commit description |
electrum
approved these changes
Feb 6, 2022
core/trino-spi/src/main/java/io/trino/spi/connector/Connector.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTransactionManager.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveTransactionManager.java
Outdated
Show resolved
Hide resolved
...in/trino-hive/src/main/java/io/trino/plugin/hive/metastore/DecoratedHiveMetastoreModule.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveMetastore.java
Outdated
Show resolved
Hide resolved
.../trino-hive/src/main/java/io/trino/plugin/hive/metastore/cache/SharedHiveMetastoreCache.java
Outdated
Show resolved
Hide resolved
.../trino-hive/src/main/java/io/trino/plugin/hive/metastore/cache/SharedHiveMetastoreCache.java
Outdated
Show resolved
Hide resolved
.../trino-hive/src/main/java/io/trino/plugin/hive/metastore/cache/SharedHiveMetastoreCache.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/file/FileHiveMetastore.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveMetastore.java
Outdated
Show resolved
Hide resolved
24a9cf7
to
ea01a7e
Compare
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.
HiveIdentity is provided to metadata objects during construction. The underlying ThriftHiveMetastore uses identity on a per call bases.
ea01a7e
to
aab50e2
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
ConnectorMetadata
actually until usedConnectorSession
during creation ofConnectorMetadata
HiveMetastore
creation untilConnectorIdentity
is available fromConnectorSession
ConnectorIdentity
curing metastore creation, and use this instead of passing to every methodGeneral 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: