Skip to content

[QTL] Implement LookupExtractorFactory of namespaced lookup - #2716

Closed
sirpkt wants to merge 12 commits into
apache:masterfrom
sirpkt:qtl_namespace_lookup
Closed

sirpkt wants to merge 12 commits into
apache:masterfrom
sirpkt:qtl_namespace_lookup

Conversation

@sirpkt

@sirpkt sirpkt commented Mar 24, 2016 •

Copy link
Copy Markdown
Contributor

This patch adds LookupExtractorFactory of namespaced lookup.
With this, NamespacedExtractor can be used with LookupDimensionSpec.
Done as a first step to merge #2524 with QTL.

Migrated to #2926

@drcrallen drcrallen added this to the 0.9.1 milestone Mar 24, 2016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should log that it was interrupted (probably as error) and return false.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

log added

@drcrallen drcrallen self-assigned this Mar 24, 2016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggest making this namespace to match io.druid.query.extraction.NamespacedExtractor

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

@drcrallen

Copy link
Copy Markdown
Contributor

I realized I hadn't written this down yet, but I'm thinking this PR might be able to be the switching point for the extension to allow the recommended lookups to go through the dynamic configuration instead of through static configs for this extension. (mentioned in #2735 (comment) )

If you think such a task is too far out of scope for this PR, please let me know and we can limit the scope here to a minimal change, and have a potentially more sweeping change come later.

@sirpkt

sirpkt commented Mar 28, 2016

Copy link
Copy Markdown
Contributor Author

@drcrallen Ok I'll try to eliminate static configuration of namespace lookup.
As I know, druid-namespace-lookup and druid-kaka-extraction-namespace are the only two extension modules related with lookup, right?

@drcrallen

Copy link
Copy Markdown
Contributor

@sirpkt The only druid.io modules, yes.

… eliminate static configurations for lookup from namespecd lookup extensions

- druid-namespace-lookup and druid-kafka-extraction-namespace are modified
- However, druid-namespace-lookup still has configuration about ON/OFF
  HEAP cache manager selection, which is not namespace wide
  configuration but node wide configuration as multiple namespace shares
  the same cache manager
@sirpkt
sirpkt force-pushed the qtl_namespace_lookup branch from 7f918f3 to 14f4c88 Compare March 31, 2016 01:15
@sirpkt

sirpkt commented Apr 1, 2016

Copy link
Copy Markdown
Contributor Author

Static config for lookup is eliminated.
Only druid.query.extraction.namespace.cache.type is remained to select type of cache between on/off heap as it is module-wide not per-namespace config.

public KafkaExtractionNamespace(
@NotNull @JsonProperty(value = "kafkaTopic", required = true) final String kafkaTopic,
@NotNull @JsonProperty(value = "namespace", required = true) final String namespace
@NotNull @JsonProperty(value = "kafkaProperites", required = true) final Properties kafkaProperties

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this need to be required? also required=true is just a hint, you still have to enforce not null checks in constructor to be ACTUALLY required.

@drcrallen drcrallen removed their assignment Apr 12, 2016
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Executors;
import java.util.concurrent.*;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

could you only import the required classes ?

@b-slim

b-slim commented Apr 20, 2016

Copy link
Copy Markdown
Contributor

@sirpkt and @drcrallen what's the status of this PR ?

@sirpkt

sirpkt commented Apr 22, 2016

Copy link
Copy Markdown
Contributor Author

@b-slim waiting for the commit of #2800.
This will be rebased based on it.

@drcrallen

Copy link
Copy Markdown
Contributor

@b-slim excluding the kafka extension, the rest should be about ready.

@b-slim

b-slim commented Apr 27, 2016

Copy link
Copy Markdown
Contributor

@drcrallen and @sirpkt can we split this to make review straightforward ?

@drcrallen

Copy link
Copy Markdown
Contributor

@sirpkt Please check out sirpkt#2 which is a merge to master and reverting of the kafka stuff

@sirpkt

sirpkt commented May 3, 2016

Copy link
Copy Markdown
Contributor Author

merge sirpkt#2 and rebased.

@drcrallen

Copy link
Copy Markdown
Contributor

@b-slim this should be ready for final review (and merge)

@fjy

fjy commented May 5, 2016

Copy link
Copy Markdown
Contributor

@b-slim can we finish this up?

@b-slim

b-slim commented May 5, 2016

Copy link
Copy Markdown
Contributor

@fjy it is in the pipeline...

*/
public class KafkaExtractionManager
{
private static final Logger log = new Logger(KafkaExtractionManager.class);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we call all the static variable with upper case please ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

log is log across all of the Druid code base...

@b-slim

b-slim commented May 5, 2016

Copy link
Copy Markdown
Contributor

@drcrallen let me know when this is ready.

@drcrallen

Copy link
Copy Markdown
Contributor

@b-slim the non-kafka stuff should be ready

@drcrallen

Copy link
Copy Markdown
Contributor

@sirpkt I'm going to move this PR to a MMX branch. Since most of the reviewers are in my timezone I can have faster modifications while they are awake.

@drcrallen drcrallen closed this May 5, 2016
@drcrallen

Copy link
Copy Markdown
Contributor

Moved to #2926

@sirpkt

sirpkt commented May 5, 2016

Copy link
Copy Markdown
Contributor Author

@drcrallen OK

@sirpkt
sirpkt deleted the qtl_namespace_lookup branch May 30, 2016 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants