Invalidate CachingDirectoryLister when writing through Trino#10915
Merged
findepi merged 2 commits intotrinodb:masterfrom Feb 21, 2022
Merged
Invalidate CachingDirectoryLister when writing through Trino#10915findepi merged 2 commits intotrinodb:masterfrom
findepi merged 2 commits intotrinodb:masterfrom
Conversation
findepi
requested changes
Feb 3, 2022
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
647688c to
973a952
Compare
findinpath
commented
Feb 8, 2022
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
42c8263 to
8e5c6a0
Compare
findepi
requested changes
Feb 8, 2022
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/SchemaTableListener.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/SchemaTableListener.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
8e5c6a0 to
e144cf4
Compare
losipiuk
reviewed
Feb 8, 2022
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
0d560c0 to
96fddfd
Compare
Contributor
Author
|
Rebasing on |
bcca8eb to
f20dd3d
Compare
120171e to
7c47b88
Compare
7c47b88 to
ed4dc20
Compare
findinpath
commented
Feb 11, 2022
plugin/trino-hive/src/main/java/io/trino/plugin/hive/DirectoryCallback.java
Outdated
Show resolved
Hide resolved
d5fb37e to
41f2272
Compare
findepi
reviewed
Feb 14, 2022
plugin/trino-hive/src/main/java/io/trino/plugin/hive/DirectoryCallback.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/DirectoryCallback.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/InternalHiveConnectorFactory.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestCachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestCachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestCachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
5be4f4d to
8a0d93d
Compare
94ced51 to
bc53cc2
Compare
Member
|
( currently, depends on #11047 ) |
findepi
reviewed
Feb 16, 2022
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
a1c823b to
539bd8a
Compare
Contributor
Author
|
Rebased on upstream/master to make use of the EvictableCache improvements #11047 |
findepi
reviewed
Feb 17, 2022
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryListerModule.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/TableChangeCallback.java
Outdated
Show resolved
Hide resolved
539bd8a to
17178c2
Compare
findinpath
commented
Feb 17, 2022
Contributor
Author
There was a problem hiding this comment.
Can the usage of the constructor with an unexpected path cause us problems?
I could use String instead of Path for the cache keys to be on the safe side.
findepi
approved these changes
Feb 18, 2022
plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.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
17178c2 to
0428a10
Compare
Notify the CachingDirectoryLister about changes that happen on the table in order to be able to invalidate the cached directory listings for Hive tables or partitions of the Hive tables. When the content of a table/partition changes, all the cached paths for under the corresponding table/partition directory will be invalidated from the cache. Co-authored-by: Piotr Findeisen <piotr.findeisen@gmail.com>
0428a10 to
ba52cee
Compare
Closed
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
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
Notify the CachingDirectoryLister about changes that happen
on the table / partition(s) in order to be able to invalidate
the cached directory listings for Hive tables or
partitions of the Hive table.
General information
Is this change a fix, improvement, new feature, refactoring, or other?
This is a cache invalidation fix.
Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)
This change affects the Hive connector.
How would you describe this change to a non-technical end user or system administrator?
When the content of a table changes,
all the cached paths for under belonging to the table will be
invalidated from the cache.
Please do note that the current implementation does not
make the CachingDirectoryLister aware of changes
performed on the table content by external processes
(e.g. : Hive, Spark).
Related issues, pull requests, and links
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.
( x) Release notes entries required with the following suggested text:
Fixes #10621