Hi Wout, Maye check your classpath http client versions (against https://github.com/apache/beam/blob/v2.7.0/sdks/java/io/elasticsearch/build.gradle for instance).
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://rmannibucau.metawerx.net/> | Old Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book <https://www.packtpub.com/application-development/java-ee-8-high-performance> Le mer. 10 oct. 2018 à 15:37, Wout Scheepers < wout.scheep...@vente-exclusive.com> a écrit : > Hey JB, > > Thanks for your fast reply. > The elastic version we're using is 5.6.2. > > "version": { > "number": "5.6.2", > "build_hash": "57e20f3", > "build_date": "2017-09-23T13:16:45.703Z", > "build_snapshot": false, > "lucene_version": "6.6.1" > } > > > Wout > > > > On 10/10/2018, 15:34, "Jean-Baptiste Onofré" <j...@nanthrax.net> wrote: > > Hi Wout, > > what's the elasticsearch version ? (just to try to reproduce) > > Thanks, > Regards > JB > > On 10/10/2018 15:31, Wout Scheepers wrote: > > Hey all, > > > > > > > > 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:167) > > > > at > > org.apache.beam.sdk.io > .elasticsearch.ElasticsearchIO.checkForErrors(ElasticsearchIO.java:171) > > > > at > > org.apache.beam.sdk.io > .elasticsearch.ElasticsearchIO$Write$WriteFn.flushBatch(ElasticsearchIO.java:1213) > > > > at > > org.apache.beam.sdk.io > .elasticsearch.ElasticsearchIO$Write$WriteFn.finishBundle(ElasticsearchIO.java:1183) > > > > > > > > I’ve been breaking my head on this one. > > > > Apparently the elastic Response object can’t be parsed anymore in the > > checkForErrors() method. > > > > However, it is parsed successfully in the default RetryPredicate’s > test > > method, which is called in flushBatch() in the if clause related to > the > > retryConfig (ElasticsearchIO:1201). > > > > As far as I know, the Response object is not altered. > > > > > > > > Any clues why this doesn’t work for me? > > > > I really need this feature, as inserting 40M documents into elastic > > results in too many retry timeouts ☺. > > > > > > > > Thanks! > > Wout > > > > > > > > > > > > -- > Jean-Baptiste Onofré > jbono...@apache.org > http://blog.nanthrax.net > Talend - http://www.talend.com > > >