[ 
https://issues.apache.org/jira/browse/METRON-326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15536015#comment-15536015
 ] 

ASF GitHub Bot commented on METRON-326:
---------------------------------------

Github user cestella commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/286#discussion_r81338875
  
    --- Diff: 
metron-platform/metron-writer/src/main/java/org/apache/metron/writer/WriterToBulkWriter.java
 ---
    @@ -44,11 +45,15 @@ public void init(Map stormConf, WriterConfiguration 
config) throws Exception {
       }
     
       @Override
    -  public void write(String sensorType, WriterConfiguration configurations, 
Iterable<Tuple> tuples, List<MESSAGE_T> messages) throws Exception {
    +  public BulkWriterResponse write(String sensorType, WriterConfiguration 
configurations, Iterable<Tuple> tuples, List<MESSAGE_T> messages) throws 
Exception {
         if(messages.size() > 1) {
           throw new IllegalStateException("WriterToBulkWriter expects a batch 
of exactly 1");
         }
         messageWriter.write(sensorType, configurations, 
Iterables.getFirst(tuples, null), Iterables.getFirst(messages, null));
    +
    +    BulkWriterResponse response = new BulkWriterResponse();
    --- End diff --
    
    What if there's an error writing?  Do we still want to add the tuples to 
the response as successes?


> Error Handling in ElasticsearchWriter
> -------------------------------------
>
>                 Key: METRON-326
>                 URL: https://issues.apache.org/jira/browse/METRON-326
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Ajay Yadav
>            Assignee: Justin Leet
>
> In Elasticsearch writer we raise a exception if BulkResponse object has 
> failures and that results in failing the whole batch even if some objects 
> failed in it. This has spiral effect specially when there is continuous 
> stream of bad messages and errorStream is tied to indexingBolt. 
> If possible we should iterate through items in BulkResponse object and send 
> only failed messages to errorStream.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to