[
https://issues.apache.org/jira/browse/FLINK-3332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15168795#comment-15168795
]
ASF GitHub Bot commented on FLINK-3332:
---------------------------------------
Github user spdrnl commented on the pull request:
https://github.com/apache/flink/pull/1640#issuecomment-189210134
In some circumstances it is possible to make writes to Cassandra
idempotent, by adding an unique id to the insert. See the example below.
Counters are probably different in this though.
```
cqlsh:mykeyspace> CREATE TABLE IF NOT EXISTS timeline (
eid uuid,
timesegment bigint,
from_url text,
to_url text,
PRIMARY KEY ((timesegment) , eid));
cqlsh:mykeyspace> INSERT INTO timeline (eid, timesegment, from_url, to_url)
VALUES(50554d6e-29bb-11e5-b345-feff819cdc9f, 1, 'a', 'b') ;
cqlsh:mykeyspace> SELECT * FROM timeline;
timesegment | eid | from_url | to_url
-------------+--------------------------------------+----------+--------
1 | 50554d6e-29bb-11e5-b345-feff819cdc9f | a | b
(1 rows)
cqlsh:mykeyspace> INSERT INTO timeline (eid, timesegment, from_url, to_url)
VALUES(50554d6e-29bb-11e5-b345-feff819cdc9f, 1, 'a', 'b') ;
cqlsh:mykeyspace> SELECT * FROM timeline;
timesegment | eid | from_url | to_url
-------------+--------------------------------------+----------+--------
1 | 50554d6e-29bb-11e5-b345-feff819cdc9f | a | b
(1 rows)
cqlsh:mykeyspace> INSERT INTO timeline (eid, timesegment, from_url, to_url)
VALUES(uuid(), 1, 'a', 'b') ;
cqlsh:mykeyspace> SELECT * FROM timeline;
timesegment | eid | from_url | to_url
-------------+--------------------------------------+----------+--------
1 | 50554d6e-29bb-11e5-b345-feff819cdc9f | a | b
1 | 35761e5e-06b3-4ce6-9038-c9014e498281 | a | b
```
> Provide an exactly-once Cassandra connector
> -------------------------------------------
>
> Key: FLINK-3332
> URL: https://issues.apache.org/jira/browse/FLINK-3332
> Project: Flink
> Issue Type: Improvement
> Components: Streaming Connectors
> Reporter: Robert Metzger
> Assignee: Chesnay Schepler
>
> With FLINK-3311, we are adding a Cassandra connector to Flink.
> It would be good to also provide an "exactly-once" C* connector.
> I would like to first discuss how we are going to implement this in Flink.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)