Skip to content

add date processor#14184

Merged
javanna merged 10 commits intoelastic:feature/ingestfrom
talevy:ingest/date
Nov 9, 2015
Merged

add date processor#14184
javanna merged 10 commits intoelastic:feature/ingestfrom
talevy:ingest/date

Conversation

@talevy
Copy link
Copy Markdown
Contributor

@talevy talevy commented Oct 19, 2015

This PR introduces a date processor to help extract datetime values from fields.

@talevy talevy added the :Distributed/Ingest Node Execution or management of Ingest Pipelines label Oct 19, 2015
@talevy talevy force-pushed the ingest/date branch 2 times, most recently from 0b27867 to 0b60026 Compare October 20, 2015 09:15
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.

Processor moved to org.elasticsearch.ingest.processor.Processor

@javanna javanna changed the title [WIP] add date processor add date processor Nov 6, 2015
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.

I am not clear on whether this is needed or not. seems like everything works anyway but I wouldn't want ingest to depend on the forked joda that we have in es core.

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.

I initially thought that this would be a problem, but a plugin can have its version of a dependency thanks to the fact that each plugins runs isolated in its own class loader.

@javanna
Copy link
Copy Markdown
Contributor

javanna commented Nov 6, 2015

this should be ready for review @talevy @martijnvg

@talevy
Copy link
Copy Markdown
Contributor Author

talevy commented Nov 6, 2015

sweet! can you add some short docs for this processor in docs/plugins/ingest.asciidoc just so we have something there for now?

@javanna
Copy link
Copy Markdown
Contributor

javanna commented Nov 6, 2015

@talevy sure will add docs

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.

how about this one @talevy ?

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.

This was a placeholder to remind us that logstash-filter-date accepts more lenient forms of ISO8601 that may not match exactly. I am not sure how important this is. Maybe @jordansissel can shed some light on why these more lenient forms came to be.

here is the logstash code:
file: date.rb

...
#Fall back solution of almost ISO8601 date-time
almostISOparsers = [
org.joda.time.format.DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss.SSSZ").getParser(),
org.joda.time.format.DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss.SSS").getParser(),
org.joda.time.format.DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss,SSSZ").getParser(),
org.joda.time.format.DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss,SSS").getParser()
].to_java(org.joda.time.format.DateTimeParser)
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Ingest Node Execution or management of Ingest Pipelines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants