Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-5725

ElasticsearchIO RetryConfiguration response parse failure

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0
    • Component/s: io-java-elasticsearch
    • Labels:
      None

      Description

      When using .withRetryConfiguration() for ElasticsearchIO, I get the following stacktrace:

       

       

      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)
      

       

       

      Probably the elastic response object's content stream is consumed twice, resulting in a MismatchedInputException.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wouts Wout Scheepers
                Reporter:
                wouts Wout Scheepers
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h