Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Flume, mail # user - Json over netcat source


Copy link to this message
-
Re: Json over netcat source
Ashish 2014-04-13, 15:56
little more on the issue

builder.field(fieldName, tmp); calls the XContentBuilder API where class
type is determined and appropriate method is called. Since tmp, which is
instance of XContentBuilder, doesn't match any of the defined if conditions
it goes to final else where the tmp.toString() is called, and field(String,
String) method is called so we get object address in index.

Replacing
builder.field(fieldName, tmp);
with
builder.field(fieldName, tmp.string());

shall make things work, but I am not sure if this would be the best way to
use the API.

Got the answer from ES user list :)
http://elasticsearch-users.115913.n3.nabble.com/Issue-with-posting-json-data-to-elastic-search-via-Flume-td4054017.html

Can ES experts comment on the best way forward?

On Sun, Apr 13, 2014 at 8:10 PM, Ashish <[EMAIL PROTECTED]> wrote:
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal