-
Notifications
You must be signed in to change notification settings - Fork 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
[core] Introduce CachingCatalog #3829
Conversation
fb989b5
to
cbd35ce
Compare
4ae1282
to
a3e19b4
Compare
} | ||
} | ||
|
||
private void invalidateTable(Identifier identifier) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can expose the method. For example, Spark TableCatalog
has an interface which should uses it
/**
* Invalidate cached table metadata for an {@link Identifier identifier}.
* <p>
* If the table is already loaded or cached, drop cached data. If the table does not exist or is
* not cached, do nothing. Calling this method should not query remote services.
*
* @param ident a table identifier
*/
default void invalidateTable(Identifier ident) {
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look good to me! just wonder whether 30s is a bit short
.booleanType() | ||
.defaultValue(true) | ||
.withDescription( | ||
"Controls whether the catalog will cache table entries upon load."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
entries
should be more detailed. CacheCatalog
caches tables and databases.
Purpose
Introduce a caching catalog, it is enabled by default, and its expiration interval is 30 s.
This can effectively reduce interaction with the metastore and lower the pressure on the metastore.
This is based on #3824
Tests
API and Format
Documentation