Issue with posting json data to elastic search via Flume
I am using Flume to post data to ElasticSearch. When the data is xml it works fine. But when the data is json it is loading incorrect data in the message field.I checked the flume code. It looks like the issue may be with the elasticsearch code XContentBuilder.
Instead of JSON message it is storing message data as "org.elasticsearch.common.xcontent.XContentBuilder@32f4122e"
I tried using the DynamicSerializer and ElasticSearchIndexRequestBuilderFactory but no luck.
Here is the sample data posted on Elastic Search when the data loaded is JSON.
From Hive when I load JSON data it automatically splits JSON fields to different columns. For some reason the ESSink doesnt load in the same way. I am not sure if I am setting the correct type. There is a parameter es.input.json I have to set to true in hive table . Is there any similar variable I have to set for ESSink .I set some headers as application/json. But no luck. Here is the data I am getting in KIbana.