Hi,
In the doc section about Cassandra there is actually an example:
https://ci.apache.org/projects/flink/flink-docs-release-1.4/dev/connectors/cassandra.html
<https://ci.apache.org/projects/flink/flink-docs-release-1.4/dev/connectors/cassandra.html>.
In a Flink Job you would therefore roughly do this:
StreamExecutionEnvironment env = ...:
DataStream<> input = env.addSource(...);
CassandraSink.addSink(input)
.setQuery("INSERT INTO example.values (id, counter) values (?, ?);")
.setClusterBuilder(new ClusterBuilder() {
@Override
public Cluster buildCluster(Cluster.Builder builder) {
return builder.addContactPoint("127.0.0.1").build();
}
}).build();
env.execute();
Best,
Aljoscha
> On 8. Aug 2017, at 21:08, AndreaKinn <[email protected]> wrote:
>
> I probably solved import issue, but still need help to find some examples of
> use.
> Please let me know if someone has experience with Flink and Cassandra
> together
>
>
>
> --
> View this message in context:
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Writing-on-Cassandra-tp14744p14745.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive at
> Nabble.com.