You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by ZalaCheung <gz...@corp.netease.com> on 2017/07/20 07:31:17 UTC
cannot use ElasticsearchSink in Flink1.3.0
Hi all,
I am using Flink 1.3.0 and following instructions here to add elasticsearch as a sink.
https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/connectors/elasticsearch.html <https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/connectors/elasticsearch.html>
I follow the instruction to add the dependency like this:
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-elasticsearch5_2.10</artifactId>
<version>${flink.version}</version>
the flink version is 1.3.0.
When I try to write code to add es as sink, IntelliJ cannot resolve symbol for “ElasticsearchSink”.
result.addSink(new ElasticsearchSink<>(config, transportAddresses, new ElasticsearchSinkFunction<String>(){
public IndexRequest createIndexRequest(String element){
}
@Override
public void process(String element, RuntimeContext ctx, RequestIndexer indexer) {
}
}));
The elastic package doesn’t contain anything called “ElasticsearchSink”, only has “ElasticserachSinkFunciton”
import org.apache.flink.streaming.connectors.elasticsearch.
Thanks,
Desheng Zhang
E-mail: gzzhangdesheng@corp.netease.com;
Re: cannot use ElasticsearchSink in Flink1.3.0
Posted by "Tzu-Li (Gordon) Tai" <tz...@apache.org>.
Hi,
There was an issue with release ES 5 in 1.3.0, and the artifacts were not released to Maven central.
Please use 1.3.1 instead.
Cheers,
Gordon
On 20 July 2017 at 3:31:39 PM, ZalaCheung (gzzhangdesheng@corp.netease.com) wrote:
Hi all,
I am using Flink 1.3.0 and following instructions here to add elasticsearch as a sink.
https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/connectors/elasticsearch.html
I follow the instruction to add the dependency like this:
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-elasticsearch5_2.10</artifactId>
<version>${flink.version}</version>
the flink version is 1.3.0.
When I try to write code to add es as sink, IntelliJ cannot resolve symbol for “ElasticsearchSink”.
result.addSink(new ElasticsearchSink<>(config, transportAddresses, new ElasticsearchSinkFunction<String>(){
public IndexRequest createIndexRequest(String element){
}
@Override
public void process(String element, RuntimeContext ctx, RequestIndexer indexer) {
}
}));
The elastic package doesn’t contain anything called “ElasticsearchSink”, only has “ElasticserachSinkFunciton”
import org.apache.flink.streaming.connectors.elasticsearch.
Thanks,
Desheng Zhang
E-mail: gzzhangdesheng@corp.netease.com;