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] Implement LookupExtractorFactory of namespaced lookup #2716

Closed
wants to merge 12 commits into from

Conversation

sirpkt
Copy link
Contributor

@sirpkt sirpkt commented Mar 24, 2016

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
try {
Thread.sleep(10);
} catch (InterruptedException e) {
e.printStackTrace();
Copy link
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
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
import javax.annotation.Nullable;
import java.util.List;

@JsonTypeName("name")
Copy link
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
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
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
Copy link
Contributor Author

sirpkt commented Mar 28, 2016

@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
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
Copy link
Contributor Author

sirpkt commented Apr 1, 2016

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.


@JsonCreator
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
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
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
Copy link
Contributor

b-slim commented Apr 20, 2016

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

@sirpkt
Copy link
Contributor Author

sirpkt commented Apr 22, 2016

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

@drcrallen
Copy link
Contributor

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

@b-slim
Copy link
Contributor

b-slim commented Apr 27, 2016

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

@drcrallen
Copy link
Contributor

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

@sirpkt
Copy link
Contributor Author

sirpkt commented May 3, 2016

merge sirpkt#2 and rebased.

@drcrallen
Copy link
Contributor

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

@fjy
Copy link
Contributor

fjy commented May 5, 2016

@b-slim can we finish this up?

@b-slim
Copy link
Contributor

b-slim commented May 5, 2016

@fjy it is in the pipeline...

*/
public class KafkaExtractionManager
{
private static final Logger log = new Logger(KafkaExtractionManager.class);
Copy link
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
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
Copy link
Contributor

b-slim commented May 5, 2016

@drcrallen let me know when this is ready.

@drcrallen
Copy link
Contributor

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

@drcrallen
Copy link
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
Contributor

Moved to #2926

@sirpkt
Copy link
Contributor Author

sirpkt commented May 5, 2016

@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