-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Cleanup and simplify Hive Metastore API #21114
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
Merged
Merged
Conversation
This file contains hidden or 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
7e0617e to
08f97a0
Compare
electrum
approved these changes
Mar 15, 2024
plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetadata.java
Outdated
Show resolved
Hide resolved
.../trino-hive/src/main/java/io/trino/plugin/hive/metastore/SemiTransactionalHiveMetastore.java
Outdated
Show resolved
Hide resolved
.../trino-hive/src/main/java/io/trino/plugin/hive/metastore/SemiTransactionalHiveMetastore.java
Outdated
Show resolved
Hide resolved
.../trino-hive/src/main/java/io/trino/plugin/hive/metastore/SemiTransactionalHiveMetastore.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/TableInfo.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
These can be restored if support ever materializes
All implementations delegate to the static method ThriftMetastoreUtil.getSupportedColumnStatistics
08f97a0 to
85df3aa
Compare
ThriftHiveMetastore uses getTableMeta which returns table name, table type and comment. This can be used to determine if the table is a regular table, view, or materialized view, and for the latter two, the comment can determine if it is a Trino view. For Glue and file metastores, the full table information is already available.
This simplifies the metastore cache and makes it more effective since each schema has a separate cache which expires independently. This also removes the risk of the all-tables and schema specific caches being out of sync. This method was only implemented by the ThriftHiveMetstore. In large installations this is often disabled because the Thrift response can be too large. For installations with a large number of schemas, this will increase HMS request count for clients listing all tables and all columns. This may or may not increase backing database load since, the smaller requests may be easier to process. It is recommended that the metastore cache be enabled for installations concerned about this potential increase in load.
85df3aa to
6c91f68
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cla-signed
delta-lake
Delta Lake connector
hive
Hive connector
hudi
Hudi connector
iceberg
Iceberg connector
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
More refactoring and simplifications.
Release notes
(x) This is not user-visible or is docs only, and no release notes are required.