Search code examples
elasticsearchflume

Elasticsearch serializer to accept JSON string as document


My application needs to write to Flume and flume forwards the request to Elasticsearch. I have not figured out how to accept the data as json string so that flume build a document around it and index to Elasticsearch.

I tried netcat as source , but then it created a document with field body and put my string JSON into it. i would rather expect it to create a document by deserializing the JSON string.


Solution

  • The upcoming Flume 1.6 release has much better support for this.

    Alternatively, write your own serializer.