Skip to content
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

Merged
merged 1 commit into from
Sep 16, 2016

Conversation

b-slim
Copy link
Contributor

@b-slim b-slim commented Apr 12, 2016

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.

@b-slim b-slim force-pushed the new_lookup_module branch 2 times, most recently from a3ff3f2 to 6a926d4 Compare April 19, 2016 20:00
@b-slim b-slim changed the title [WIP][QTL]Cached lookup module for JDBC connectors. [QTL]Cached lookup module for JDBC connectors. Apr 19, 2016
@@ -0,0 +1,122 @@
# Cached Lookup Module
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@b-slim
Copy link
Contributor Author

b-slim commented Apr 21, 2016

io.druid.indexing.overlord.RemoteTaskRunnerTest
testRunSameAvailabilityGroup(io.druid.indexing.overlord.RemoteTaskRunnerTest)  Time elapsed: 4.541 sec  <<< FAILURE!
java.lang.AssertionError: null
    at org.junit.Assert.fail(Assert.java:86)
    at org.junit.Assert.assertTrue(Assert.java:41)
    at org.junit.Assert.assertTrue(Assert.java:52)
    at io.druid.indexing.overlord.RemoteTaskRunnerTest.testRunSameAvailabilityGroup(RemoteTaskRunnerTest.java:232)

@b-slim b-slim closed this Apr 21, 2016
@b-slim b-slim reopened this Apr 21, 2016
* 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
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@himanshug
Copy link
Contributor

@b-slim can you please take care of the comments? lets get this merged.

@b-slim
Copy link
Contributor Author

b-slim commented Jul 22, 2016

@himanshug sure ASAP.

@drcrallen
Copy link
Contributor

@b-slim is this ready for review?

@b-slim
Copy link
Contributor Author

b-slim commented Aug 16, 2016

@drcrallen and @himanshug this is ready for review, thanks

@@ -0,0 +1,121 @@
# Cached Lookup Module
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks fixed !

@drcrallen
Copy link
Contributor

Minor formatting changes and I suggest reverting LookupDimensionSpec unless the change is required for this PR and it is fully tested.

@drcrallen
Copy link
Contributor

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.**
Copy link
Contributor

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>

Copy link
Contributor Author

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:
Copy link
Contributor

@gianm gianm Sep 16, 2016

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

Copy link
Contributor Author

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();
}

Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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.
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point will add

Copy link
Contributor Author

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)|
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@gianm gianm left a 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.

@b-slim
Copy link
Contributor Author

b-slim commented Sep 16, 2016

@gianm thanks fixed the doc and the blocking comment.

@drcrallen
Copy link
Contributor

Gah! history got overwritten. ok, assuming only the comments got addressed and nothing else got changed then

@b-slim
Copy link
Contributor Author

b-slim commented Sep 16, 2016

@drcrallen yes i did rebase it to revert and clean the dozen of commits messages.

@gianm
Copy link
Contributor

gianm commented Sep 16, 2016

👍 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.

@drcrallen drcrallen merged commit 3175e17 into apache:master Sep 16, 2016
@drcrallen
Copy link
Contributor

BOOM!

@gianm
Copy link
Contributor

gianm commented Sep 16, 2016

good job, we made it to 300 comments on this PR :)

@b-slim
Copy link
Contributor Author

b-slim commented Sep 16, 2016

oh such great PR 🐹

@gianm gianm mentioned this pull request Sep 23, 2016
@b-slim b-slim deleted the new_lookup_module branch April 26, 2018 01:28
seoeun25 added a commit to seoeun25/incubator-druid that referenced this pull request Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants