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.
The temporary fix helped. I can now see the JSON message instead of seeing data as ""org.elasticsearch.common.xcontent.XContentBuilder@32f4122e" .
There is a JIRA also on the issue. https://issues.apache.org/jira/browse/FLUME-2126
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.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.