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

Investigate moving from Joda to java.time #12829

Closed
clintongormley opened this issue Aug 12, 2015 · 9 comments
Closed

Investigate moving from Joda to java.time #12829

clintongormley opened this issue Aug 12, 2015 · 9 comments
Assignees
Labels
help wanted adoptme high hanging fruit :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch

Comments

@clintongormley
Copy link

Today we use a forked version of Joda for performance reasons. This can lead to problems with class loading (eg #10290, #3557, #4660), and requires us to have hacks to ensure that our version of Joda is loaded first.

We should investigate the possibility of replacing Joda with java.time. One roadblock would be the need to reimplement the dateOptionalTimeParser, which doesn't have an equivalent java.time. See http://sourceforge.net/p/joda/mailman/message/34327973/ for more

@uschindler
Copy link
Contributor

Strong +1

@jack-pappas
Copy link

Another alternative might be to use date4j instead of Joda Time. It's supposedly faster than Joda and should also fix the timestamp-precision issues (Joda only maintains millisecond-level precision and truncates any timestamps more precise than that).

@dadoonet
Copy link
Member

Note that date4j uses a BSD license.

@s1monw
Copy link
Contributor

s1monw commented Sep 13, 2015

In general I think the less dependencies we have the better ie. I think cutting over to java.time would be ideal from a maintenance perspective

@uschindler
Copy link
Contributor

In addition, as java.time (which is a fork of joda anyways) is part of the JDK, it should get more attention by Hotspot deveopers. We may get performance improvements...

BTW: forbidden-apis 2.0 has new signatures around java.time, but they are also part of Lucene's signature files. If you want to switch, I would recommend to use those (or update to 2.0, which comes earlier).

@uschindler
Copy link
Contributor

@jordansissel
Copy link
Contributor

Slightly related -- Logstash will also be moving its date filter to use java.time. We will share any lessons learned if we get to this first.

@clintongormley clintongormley added :Search Foundations/Mapping Index mappings, including merging and defining field types and removed :Dates labels Feb 13, 2018
@jpountz
Copy link
Contributor

jpountz commented Mar 14, 2018

cc @elastic/es-search-aggs

@jpountz
Copy link
Contributor

jpountz commented Mar 14, 2018

Closing in favour of #27330.

@jpountz jpountz closed this as completed Mar 14, 2018
@javanna javanna added the Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted adoptme high hanging fruit :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch
Projects
None yet
Development

No branches or pull requests

9 participants