Think I hit a regression in the record api

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Think I hit a regression in the record api

Mike Thomsen
Schema:

{
    "type": "record",
    "name": "TSTest",
    "fields": [
        { "name": "uuid", "type":"string" },
        { "name": "ts", "type": { "type": "long", "logicalType":
"timestamp-millis" }}
    ]
}

Example input:

{
  "uuid": "4e64ce00-e6cc-492c-a4d6-57d3f43c4101",
  "ts": 1544460087689
}

I had a JsonTreeReader set on PutElasticSearchHttpRecord, and it used the
format below:

yyyy-MM-dd'T'HH:mm:ss'Z'

ElasticSearch reported invalid input, and when I looked at the output being
sent to Elastic it appeared to be hard set to use yyyy-MM-dd HH:mm:ss

I added that format to the date field in Elastic, and Elastic was happy
with the input.

Best I can tell, it appears that in 1.8 it's ignoring the user-supplied
timestamp formatter.
Reply | Threaded
Open this post in threaded view
|

Re: Think I hit a regression in the record api

Otto Fowler
Is there a unit test for that?


On December 10, 2018 at 12:05:22, Mike Thomsen ([hidden email])
wrote:

Schema:

{
"type": "record",
"name": "TSTest",
"fields": [
{ "name": "uuid", "type":"string" },
{ "name": "ts", "type": { "type": "long", "logicalType":
"timestamp-millis" }}
]
}

Example input:

{
"uuid": "4e64ce00-e6cc-492c-a4d6-57d3f43c4101",
"ts": 1544460087689
}

I had a JsonTreeReader set on PutElasticSearchHttpRecord, and it used the
format below:

yyyy-MM-dd'T'HH:mm:ss'Z'

ElasticSearch reported invalid input, and when I looked at the output being
sent to Elastic it appeared to be hard set to use yyyy-MM-dd HH:mm:ss

I added that format to the date field in Elastic, and Elastic was happy
with the input.

Best I can tell, it appears that in 1.8 it's ignoring the user-supplied
timestamp formatter.