Re: Insert data into Cassandra without Flink Cassandra connection

2018-05-02 Thread Shuyi Chen
Maybe you can share a bit more about why you need only one connection to Cassandra across all TaskManagers, so we can better help? On Wed, May 2, 2018 at 4:08 AM, Piotr Nowojski wrote: > Hi, > > The only way that I can think of is if you keep your flatMap operator with > parallelism 1, but that

Re: Insert data into Cassandra without Flink Cassandra connection

2018-05-02 Thread Piotr Nowojski
Hi, The only way that I can think of is if you keep your flatMap operator with parallelism 1, but that might defeat the purpose. Otherwise there is no way to open one single connection and share it across multiple TaskManagers (which can be running on different physical machines). Please rethin

Re: Insert data into Cassandra without Flink Cassandra connection

2018-04-26 Thread Soheil Pourbafrani
Here is my code stream.flatMap(new FlatMapFunction() { @Override public void flatMap(byte[] value, Collector out) throws Exception { Parser.setInsert(true); CassandraConnection.connect(); Parser.setInsert(true); System.out.println("\n*** New Message

Insert data into Cassandra without Flink Cassandra connection

2018-04-26 Thread Soheil Pourbafrani
I want to use Cassandra native connection (Not Flink Cassandra connection) to insert some data into Cassandra. According to the design of the code, the connection to Cassandra will open once at the start and all taskmanager use it to write data. It's ok running in local mode. The problem is when