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

Implement Java Version of this Plugin's Logic and Benchmark against Current Version #112

Open
original-brownbear opened this issue May 9, 2017 · 2 comments

Comments

@original-brownbear
Copy link
Contributor

It's in the title, also see #111 (comment) for the background.

@suyograo
Copy link
Contributor

suyograo commented May 9, 2017

Just as an FYI when we get to this. The original ruby (and C!) implementation from @jordansissel is here https://github.com/jordansissel/ruby-grok. We should port all the awesome tests from that library (even if it's in Ruby). Also, for reference, there is a ingest node implementation of grok from @talevy https://github.com/elastic/elasticsearch/blob/master/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/Grok.java.

Ideally, we would have a Grok library we can reuse in both ES and LS, but for now, we can have the Java implementation embedded here. Open to separating this as well from the get go. We can discuss.

@jordansissel
Copy link
Contributor

The grok implementation in Ingest won't work for Logstash because:

  • it combines patterns with regexp union | which prevents break_on_match => false from working in Logstash gork.
  • cannot be extracted from Elasticsearch due to dependency on Elasticsearch.

I'm open to review any implementation details or to share history on grok (originally written in 2004!), if you need it.

+1 on exploring this moving to java.

My intuition is that moving the capture mapping to Java will have some nice improvement since we can keep all of that work within Java and never enter JRuby during execution (regexp + capture handling).

@original-brownbear original-brownbear removed their assignment Sep 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants