{"action":"closed","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/27330","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/27330/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/27330/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/27330/events","html_url":"https://github.com/elastic/elasticsearch/issues/27330","id":272591656,"node_id":"MDU6SXNzdWUyNzI1OTE2NTY=","number":27330,"title":"Core: Migrating from joda time to java.time","user":{"login":"spinscale","id":667544,"node_id":"MDQ6VXNlcjY2NzU0NA==","avatar_url":"https://avatars2.githubusercontent.com/u/667544?v=4","gravatar_id":"","url":"https://api.github.com/users/spinscale","html_url":"https://github.com/spinscale","followers_url":"https://api.github.com/users/spinscale/followers","following_url":"https://api.github.com/users/spinscale/following{/other_user}","gists_url":"https://api.github.com/users/spinscale/gists{/gist_id}","starred_url":"https://api.github.com/users/spinscale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinscale/subscriptions","organizations_url":"https://api.github.com/users/spinscale/orgs","repos_url":"https://api.github.com/users/spinscale/repos","events_url":"https://api.github.com/users/spinscale/events{/privacy}","received_events_url":"https://api.github.com/users/spinscale/received_events","type":"User","site_admin":false},"labels":[{"id":144797810,"node_id":"MDU6TGFiZWwxNDQ3OTc4MTA=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Core/Infra/Core","name":":Core/Infra/Core","color":"0e8a16","default":false},{"id":33660,"node_id":"MDU6TGFiZWwzMzY2MA==","url":"https://api.github.com/repos/elastic/elasticsearch/labels/%3Ebreaking","name":">breaking","color":"d93f0b","default":false},{"id":23174,"node_id":"MDU6TGFiZWwyMzE3NA==","url":"https://api.github.com/repos/elastic/elasticsearch/labels/%3Eenhancement","name":">enhancement","color":"4a4ea8","default":false},{"id":158399402,"node_id":"MDU6TGFiZWwxNTgzOTk0MDI=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/Meta","name":"Meta","color":"e11d21","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2017-11-09T14:52:20Z","updated_at":"2019-04-06T04:30:34Z","closed_at":"2019-04-06T04:30:34Z","author_association":"MEMBER","body":"Objective: In order to support nanosecond resolution and to remove the joda time dependency from Elasticsearch, we need to migrate a lot of code over to java.time.\r\n\r\nThis is a meta issue detailing the steps that need to be taken to migrate away from joda time and to java.time.\r\n\r\nThere are a few things to keep in mind and discuss before outlining the single steps\r\n\r\n## Retaining our gazillion date formats\r\n\r\nDo we want to retain the tons of our named date formats, named very well like `strictOrdinalDateTimeNoMillis` or `strictWeekDateTimeNoMillis` (also we support snake and camel case for each of those!)? I think we could built a layer that is still able to read those, but then maybe convert it to formatted dates like `xxxx-'W'ww-e'T'HH:mm:ssZZ` (just an example). This way we could get rid of this mapping entirely or at least just maintain it for a few examples like `epoch_millis`, `epoch_second` and `dateOptionalTime` as the text representation are nowhere near as readable as the date time formats, once internalized.\r\n\r\nYou can find the full list in the [Joda class](https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/common/joda/Joda.java)\r\n\r\n## BWC breaking\r\n\r\nSome classes used by builders to create queries are using joda time classes. As we move towards the REST client and away from the Transport Client this will be less of an BWC issue.\r\n\r\n## Steps\r\n\r\n* [x] Ensure time zones are parsed the same way in joda and java.time, other wise the timezone parameters i.e. from the query string query/aggregations could act differently\r\n* [x] Make `DateMathParser` use `java.time`\r\n* [x] Make `IndexNameExpressionResolver.DateMathExpressionResolver` use java.time, also remove the check for the `date_math_expression_resolver.default_time_zone` and `date_math_expression_resolver.default_date_format` settings here (they are not registered anyway). #34507\r\n* [x] Ensure new java time `IndexNameExpressionResolver` is BWC compatible when formatters are used\r\n* [x] Convert field mapper types to use `ZonedDateTime` #36363\r\n* [x] Convert `DateTimeUnit`, `Rounding`, `TimeValue` classes\r\n* [x] Convert `XContentBuilder`, `StreamInput`, `StreamOutput` classes (the serialized version of this is just a long and a timezone in our streams, so those are easy to convert. Same applies for the XContentBuilder)\r\n* [x] Convert the cat API classes (super easy, mostly just formatters, that get their input as milliseconds)\r\n* [x] `SortingNumericDocValues` and classes extending from it in the fielddata package need to be converted (or removed?) #36363\r\n* [x] Replace joda with java.time in painless \r\n* [x] Replace joda with java.time in ingest #38088\r\n* [x] Mapping: Replace in `DocValueFormat` and `DateFieldMapper` #36363\r\n* [ ] Remove jodatime dependency\r\n* [x] Add support to nanosecond resolution, add new date format time that supports nanoseconds and ensure that the formatter supports it properly #32601\r\n* [x] Remove usages of joda in x-pack/ML package #36363 (partially)\r\n* [x] Remove usages of joda in Monitoring #36297 \r\n* [x] Remove usages of joda in Watcher #35809 \r\n* [x] Refactor DateHistograms bucket aggregations to use java.time #36363"}}
{"actor":{"display_login":"jasontedor"}}