Hi,

thanks for your feedback. I agree that the the current interfaces are not flexible enough to fit to every use case. The unified connector API is a a very recent feature that still needs some polishing. I'm working on a design document to improve the situation there.

For now, you can simply implement some utitilty method that just iterates over column names and types of TableSchema and calls `schema.field(name, type)`

I hope this helps.

Regards,
Timo


Am 31.08.18 um 08:10 schrieb Averell:
Good day everyone,

I tried to send UpdateRequest(s) to ElasticSearch6, and I got 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)

Below is my 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))
        }

What could be the issue here?

Thanks for your help.

Regards,
Averell



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/


Reply via email to