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
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---