Re: ElasticSearch Connector

2019-01-10 Thread Dawid Wysakowicz
Hi, I'm afraid you cannot write to different indices using the table API ElasticSearch connector. Now I know why you wanted to go through datastream API. What you could do to transform from Row to JSON is to use org.apache.flink.formats.json.JsonRowSerializationSchema from flink-json. You just ne

Re: ElasticSearch Connector

2019-01-10 Thread Ramya Ramamurthy
Hi, Sorry I am a beginner here. I am not really sure how to pack the dynamic indices here. the .index(test-ddmmyy) kind of indices here. I have set the watermark for my kafka table source, but not sure how this works on the the ElasticSearch Sink. Pasted my sample code below: tableEnv.connect(ne

Re: ElasticSearch Connector

2019-01-10 Thread miki haiat
You can use flink to manipulate the data by using TimeCharacteristic.EventTime[1] and set Watermark. Then if you have a lag or other issue the data will be insert to the correct Indexes in elastic. More specific way to implement it with kafka[2] 1. https://ci.apache.org/projects/flink/flink-d

Re: ElasticSearch Connector

2019-01-10 Thread Ramya Ramamurthy
Hi David, thanks for the quick reply. I did try that. I am not sure how to push into rolling indices here. For example, i would maintain daily indices on ES. Based on the event time, i would like to classify the packets to appropriate indices. If there was some lag in the source kafka, and i get

Re: ElasticSearch Connector

2019-01-10 Thread Dawid Wysakowicz
Hi Ramya, Have you tried writing to ES directly from table API? You can check the ES connector for table API here: https://ci.apache.org/projects/flink/flink-docs-release-1.7/dev/table/connect.html#elasticsearch-connector Best, Dawid On 10/01/2019 09:21, Ramya Ramamurthy wrote: > Hi, > > I am l

Re: [E] Re: Elasticsearch connector

2017-09-27 Thread Till Rohrmann
The problem are the different signatures. The old version seem to take an `ActionRequest` whereas the old version requires a `IndexRequest`. Cheers, Till On Tue, Sep 26, 2017 at 10:09 PM, Premkumar, Ramprabhu < ramprabhu.premku...@verizon.com> wrote: > Thank you for the response! > > It turns ou

Re: [E] Re: Elasticsearch connector

2017-09-26 Thread Premkumar, Ramprabhu
Thank you for the response! It turns out actually that elastic 5.5.1 was throwing that exception but when I used the elastic 5.1.1 it works fine. org.elasticsearch elasticsearch 5.1.1 Like Fabian Hueske mentioned previously it is not working with 5.5.1 and probably elastic versions

Re: Elasticsearch connector

2017-09-26 Thread Till Rohrmann
Hi, usually such an error indicates that you have a different version of Elasticsearch in your classpath than the one used at compile time. Please make sure that you don't have accidentally an older version of Elasticsearch in your classpath. You can see the complete classpath at the beginning of

Re: Elasticsearch connector

2017-09-25 Thread Premkumar, Ramprabhu
Hi, Receiving this exception with the 1.3.2 dependencies for elastic search connector. java.lang.NoSuchMethodError: org.elasticsearch.action.bulk.BulkProcessor.add(Lorg/elasticsearch/action/ActionRequest;)Lorg/elasticsearch/action/bulk/BulkProcessor; at org.apache.flink.streaming.connectors.elast

Re: Elasticsearch connector

2017-09-19 Thread Fabian Hueske
Hi, that's correct. Elasticsearch changed its API from 5.1 to 5.2. There is a JIRA issue for the problem [1] and a pull request [2]. It would be great if you could help to resolve the problem by verifying the PR. Thanks, Fabian [1] https://issues.apache.org/jira/browse/FLINK-7386 [2] https://gi