[ 
https://issues.apache.org/jira/browse/BEAM-5725?focusedWorklogId=163084&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-163084
 ]

ASF GitHub Bot logged work on BEAM-5725:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Nov/18 14:52
            Start Date: 06/Nov/18 14:52
    Worklog Time Spent: 10m 
      Work Description: timrobertson100 commented on a change in pull request 
#6961: BEAM-5725] ElasticsearchIO retryConfiguration response parse failure fix
URL: https://github.com/apache/beam/pull/6961#discussion_r231152469
 
 

 ##########
 File path: 
sdks/java/io/elasticsearch-tests/elasticsearch-tests-common/src/test/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIOTestCommon.java
 ##########
 @@ -619,4 +619,25 @@ public void testWriteRetry() throws Throwable {
 
     pipeline.run();
   }
+
+  public void testWriteRetryValidRequest() throws Throwable {
 
 Review comment:
   Nit 1: -public
   
   Nit 2:
   This is almost the same as the `testWrite()`. To avoid unnecessary code 
duplication perhaps this should be refactored so both call a 
`executeWriteTest(ElasticsearchIO.Write write)`
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 163084)
    Time Spent: 20m  (was: 10m)

> ElasticsearchIO RetryConfiguration response parse failure
> ---------------------------------------------------------
>
>                 Key: BEAM-5725
>                 URL: https://issues.apache.org/jira/browse/BEAM-5725
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-elasticsearch
>            Reporter: Wout Scheepers
>            Assignee: Wout Scheepers
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> When using .withRetryConfiguration() for ElasticsearchIO, I get the following 
> stacktrace:
>  
>  
> {code:java}
> Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No 
> content to map due to end-of-input
> at [Source: (org.apache.http.nio.entity.ContentInputStream); line: 1, column: 
> 0]
> at 
> com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
> at 
> com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4133)
> at 
> com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3988)
> at 
> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3058)
> at 
> org.apache.beam.sdk.io.elasticsearch.ElasticsearchIO.parseResponse(ElasticsearchIO.java:173)
> at 
> org.apache.beam.sdk.io.elasticsearch.ElasticsearchIO.checkForErrors(ElasticsearchIO.java:177)
> at 
> org.apache.beam.sdk.io.elasticsearch.ElasticsearchIO$Write$WriteFn.flushBatch(ElasticsearchIO.java:1204)
> at 
> org.apache.beam.sdk.io.elasticsearch.ElasticsearchIO$Write$WriteFn.finishBundle(ElasticsearchIO.java:1175)
> {code}
>  
>  
> Probably the elastic response object's content stream is consumed twice, 
> resulting in a MismatchedInputException.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to