Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
1.6.0
Description
When trying to send UpdateRequest(s) to ElasticSearch6, and one gets the following
error:
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)
ElasticsearchSinkFunction:
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)) }
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.
Attachments
Issue Links
- is duplicated by
-
FLINK-10271 flink-connector-elasticsearch6_2.11 have exception
- Closed
- links to