flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Till Rohrmann <trohrm...@apache.org>
Subject Re: Elasticsearch sink: Java.lang.NoSuchMethodError: org.elasticsearch.common.settings.Settings.settingsBuilder
Date Tue, 01 Nov 2016 13:05:30 GMT
Hi Pedro,

this looks like a version mismatch. Could you check which version of
elasticsearch you've in your classpath respectively uber jar? It should be
the version 2.3.5.

Cheers,
Till

On Fri, Oct 28, 2016 at 6:59 PM, PedroMrChaves <pedro.mr.chaves@gmail.com>
wrote:

> Hello,
>
> I am using Flink to write data to elasticsearch.
>
> Flink version : 1.1.3
> Elasticsearch version: 2.4.1
>
> But I am getting the following error:
>
> 1/0/28/2016 18:58:56     Job execution switched to status FAILING.
> java.lang.NoSuchMethodError:
> org.elasticsearch.common.settings.Settings.settingsBuilder()Lorg/
> elasticsearch/common/settings/Settings$Builder;
>         at
> org.apache.flink.streaming.connectors.elasticsearch2.
> ElasticsearchSink.open(ElasticsearchSink.java:162)
>         at
> org.apache.flink.api.common.functions.util.FunctionUtils.
> openFunction(FunctionUtils.java:38)
>         at
> org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(
> AbstractUdfStreamOperator.java:91)
>         at
> org.apache.flink.streaming.runtime.tasks.StreamTask.
> openAllOperators(StreamTask.java:376)
>         at
> org.apache.flink.streaming.runtime.tasks.StreamTask.
> invoke(StreamTask.java:256)
>         at org.apache.flink.runtime.taskmanager.Task.run(Task.java:585)
>         at java.lang.Thread.run(Thread.java:745)/
>
> This is the code I use to configure the sink (similar to the taxi ride
> example in
> https://www.elastic.co/blog/building-real-time-dashboard-
> applications-with-apache-flink-elasticsearch-and-kibana)
>
> /    private void elasticSink() {
>         Map<String, String> config = new HashMap<>();
>         // This instructs the sink to emit after every element, otherwise
> they would be buffered
>         config.put("bulk.flush.max.actions", "10");
>         config.put("cluster.name", "elasticdemo");
>
>         List<InetSocketAddress> transports = new ArrayList<>();
>         try {
>             transports.add(new
> InetSocketAddress(InetAddress.getByName("localhost"), 9200));
>         } catch (UnknownHostException ex) {
>             Logger.getLogger(CEPEngine.class.getName()).log(Level.SEVERE,
> null, ex);
>         }
>
>         stream.addSink(new ElasticsearchSink<>(
>                 config,
>                 transports,
>                 new AccessDataInsert()));
>
>     }/
>
> What could be the problem?
>
> Regards,
> Pedro Chaves
>
>
>
>
> --
> View this message in context: http://apache-flink-user-
> mailing-list-archive.2336050.n4.nabble.com/Elasticsearch-sink-Java-lang-
> NoSuchMethodError-org-elasticsearch-common-settings-
> Settings-settingsBur-tp9773.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive
> at Nabble.com.
>

Mime
View raw message