Reading data from Cassandra

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Reading data from Cassandra

Soheil Pourbafrani
Does Flink Cassandra Connector support reading data from Cassandra? If yes, so please give an example?
Reply | Threaded
Open this post in threaded view
|

Re: Reading data from Cassandra

Timo Walther
Hi Soheil,

yes Flink supports reading from Cassandra. You can find some examples here:

https://github.com/apache/flink/tree/master/flink-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/example

Regards,
Timo


Am 31.03.18 um 20:22 schrieb Soheil Pourbafrani:
> Does Flink Cassandra Connector support reading data from Cassandra? If
> yes, so please give an example?


Reply | Threaded
Open this post in threaded view
|

Re: Reading data from Cassandra

Timo Walther
Sorry, the examples contain only sinks. You could do an approach similar
to the one mentioned here:

https://stackoverflow.com/questions/42617575/read-write-data-into-cassandra-using-apache-flink-java-api

Either put this into your custom SourceFunction or use Async IO [1] with
a Cassandra Client.

Regards,
Timo

[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.4/dev/stream/operators/asyncio.html

Am 03.04.18 um 16:37 schrieb Timo Walther:

> Hi Soheil,
>
> yes Flink supports reading from Cassandra. You can find some examples
> here:
>
> https://github.com/apache/flink/tree/master/flink-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/example 
>
>
> Regards,
> Timo
>
>
> Am 31.03.18 um 20:22 schrieb Soheil Pourbafrani:
>> Does Flink Cassandra Connector support reading data from Cassandra?
>> If yes, so please give an example?
>