[
https://issues.apache.org/jira/browse/FLINK-10269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613114#comment-16613114
]
ASF GitHub Bot commented on FLINK-10269:
----------------------------------------
twalthr commented on a change in pull request #6682: [FLINK-10269] [connectors]
Fix Elasticsearch 6 UpdateRequest binary incompatibility
URL: https://github.com/apache/flink/pull/6682#discussion_r217281262
##########
File path: flink-end-to-end-tests/test-scripts/test_streaming_elasticsearch.sh
##########
@@ -45,4 +45,5 @@ $FLINK_DIR/bin/flink run -p 1 $TEST_ES_JAR \
--index index \
--type type
-verify_result 20 index
+# 40 index requests and 20 final update requests
+verify_result 60 index
Review comment:
yes, that was the reason
----------------------------------------------------------------
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]
> Elasticsearch 6 UpdateRequest fail because of binary incompatibility
> --------------------------------------------------------------------
>
> Key: FLINK-10269
> URL: https://issues.apache.org/jira/browse/FLINK-10269
> Project: Flink
> Issue Type: Bug
> Components: ElasticSearch Connector
> Affects Versions: 1.6.0
> Reporter: Timo Walther
> Assignee: Timo Walther
> Priority: Blocker
> Labels: pull-request-available
> Fix For: 1.6.1
>
>
> When trying to send UpdateRequest(s) to ElasticSearch6, and one gets the
> following
> error:
> {code}
> Caused by: java.lang.NoSuchMethodError:
> org.elasticsearch.action.bulk.BulkProcessor.add(Lorg/elasticsearch/action/ActionRequest;)Lorg/elasticsearch/action/bulk/BulkProcessor;
> at
> org.apache.flink.streaming.connectors.elasticsearch.BulkProcessorIndexer.add(BulkProcessorIndexer.java:76)
> {code}
> ElasticsearchSinkFunction:
> {code}
> import org.elasticsearch.action.update.UpdateRequest
> def upsertRequest(element: T): UpdateRequest = {
> new UpdateRequest(
> "myIndex",
> "record",
> s"${element.id}")
> .doc(element.toMap())
> }
> override def process(element: T, runtimeContext: RuntimeContext,
> requestIndexer: RequestIndexer): Unit = {
> requestIndexer.add(upsertRequest(element))
> }
> {code}
> This is due to a binary compatibility issue between the base module (which is
> compiled against a very old ES version and the current Elasticsearch version).
> As a work around you can simply copy
> org.apache.flink.streaming.connectors.elasticsearch.BulkProcessorIndexer to
> your project. This should ensure that the class is compiled correctly.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)