----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33215/#review80336 -----------------------------------------------------------
flume-ng-sinks/flume-ng-elasticsearch-sink/src/main/java/org/apache/flume/sink/elasticsearch/ContentBuilderUtil.java <https://reviews.apache.org/r/33215/#comment130183> To my mind, at this point I would suggest a broader comment to explain the gyrations we've been going through. How about something like: Elasticsearch will accept JSON directly but we need to validate that the incoming event is JSON first. Sadly, the elasticsearch JSON parser is a stream parser so we need to instantiate it, parse the event to validate it, then instantiate it again to provide the JSON to elasticsearch. If validation fails then the incoming event is submitted to elasticsearch as plain text. - Edward Sargisson On April 16, 2015, 5:31 a.m., Benjamin Fiorini wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/33215/ > ----------------------------------------------------------- > > (Updated April 16, 2015, 5:31 a.m.) > > > Review request for Flume. > > > Repository: flume-git > > > Description > ------- > > Elasticsearch sink fails to index malformed nested JSON > > > Diffs > ----- > > > flume-ng-sinks/flume-ng-elasticsearch-sink/src/main/java/org/apache/flume/sink/elasticsearch/ContentBuilderUtil.java > de0acf4 > > flume-ng-sinks/flume-ng-elasticsearch-sink/src/test/java/org/apache/flume/sink/elasticsearch/AbstractElasticSearchSinkTest.java > 2f8fd6d > > flume-ng-sinks/flume-ng-elasticsearch-sink/src/test/java/org/apache/flume/sink/elasticsearch/TestElasticSearchSink.java > 78e1665 > > Diff: https://reviews.apache.org/r/33215/diff/ > > > Testing > ------- > > > Thanks, > > Benjamin Fiorini > >