-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[QTL]Cached lookup module for JDBC connectors. #2819
Conversation
a3ff3f2
to
6a926d4
Compare
@@ -0,0 +1,122 @@ | |||
# Cached Lookup Module |
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.
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.
done
|
* Function to perform a one item lookup. | ||
* For instance this can be used by a loading cache to fetch the value in case of the cache doesn't have it | ||
* | ||
* @param key none null key used to lookup the value |
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.
s/none null/non-null
can you check in all places please, it seems repeated in many places.
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.
done
@b-slim can you please take care of the comments? lets get this merged. |
@himanshug sure ASAP. |
0785b2f
to
7887792
Compare
@b-slim is this ready for review? |
@drcrallen and @himanshug this is ready for review, thanks |
@@ -0,0 +1,121 @@ | |||
# Cached Lookup Module |
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.
this will not render correctly without
layout: doc_page
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.
thanks fixed !
Minor formatting changes and I suggest reverting |
I think this extension will benefit more from battle testing by interested parties rather than further review. Good job @b-slim |
--- | ||
# Cached Lookup Module | ||
|
||
**Please note that this is an experimental module and the development/testing still at early stage. Feel free to try it and give us your feedback.** |
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.
this would look prettier in a <div class="note info">xxx</div>
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.
fixed
## Architecture | ||
Generally speaking this module can be divided into two main component, namely, the data fetcher layer and caching layer. | ||
|
||
### Data Fetcher layer: |
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.
no need for :
on headings in general
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.
done
@@ -170,5 +170,4 @@ public Timestamp withHandle(Handle handle) throws Exception | |||
); | |||
return update.getTime(); | |||
} | |||
|
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.
[nit] no need for this change
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.
weird i don't see this on my IDE
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.
ok i see it now i guess
## Description | ||
This module provides a per-lookup caching mechanism for JDBC data sources. | ||
The main goal of this cache is to speed up the access to a high latency lookup sources and to provide a caching isolation for every lookup source. | ||
Thus user can define various caching strategies or and implementation per lookup, even if the source is the same. |
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.
Could you include something about whether it is intended that users could use this together with lookups-cached-global? Would be good to answer questions like:
- Do they conflict with each other or can they be loaded simultaneously?
- Does it make sense to run them side by side while migrating from one to the other?
- Does it make sense to run them side by side long term?
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.
Could you also include how to set up this extension? Something like:
Make sure to [include](../../operations/including-extensions.html) `druid-lookups-cached-single` as an extension.
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 will add
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.
done
@@ -29,6 +29,7 @@ Core extensions are maintained by Druid committers. | |||
|druid-kafka-eight|Kafka ingest firehose (high level consumer).|[link](../development/extensions-core/kafka-eight-firehose.html)| | |||
|druid-kafka-extraction-namespace|Kafka-based namespaced lookup. Requires namespace lookup extension.|[link](../development/extensions-core/kafka-extraction-namespace.html)| | |||
|druid-lookups-cached-global|A module for [lookups](../querying/lookups.html) providing a jvm-global eager caching for lookups. It provides JDBC and URI implementations for fetching lookup data.|[link](../development/extensions-core/lookups-cached-global.html)| | |||
|druid-lookups| Per lookup caching module to support the use cases where a lookup need to be isolated from the global pool of lookups |[link](../development/extensions-core/druid-lookups.html)| |
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.
This should be druid-lookups-cached-single
to match the actual module name of the extension.
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 catch
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.
done
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.
I didn't review the actual extension code, but just the docs and changes to code outside of the new extension. The comment about LookupDimensionSpec is blocking IMO; other than that I had a few suggestions for the docs.
d122a29
to
a294244
Compare
@gianm thanks fixed the doc and the blocking comment. |
Gah! history got overwritten. ok, assuming only the comments got addressed and nothing else got changed then |
@drcrallen yes i did rebase it to revert and clean the dozen of commits messages. |
👍 on the docs & non-extension changes. As discussed on the last dev sync, let's merge this (after travis) so people can give it a shot. |
BOOM! |
good job, we made it to 300 comments on this PR :) |
oh such great PR 🐹 |
In This PR introduces a cached Lookup leveraging eviction and various caching strategies.
This Lookup implementation is meant to be user with large Lookup tables that need evictions.