Re: Can Cassandra trigger delete or update data right after they are inserted?

2021-09-28 Thread Yu-Wei Su
Hi Angelo, Thank you so much for your advice. Shame on me. I didn't realize that error was from the set. It works now. Sorry for having such a stupid question. On Wed, Sep 29, 2021 at 3:19 PM Angelo Polo wrote: > Hi Yu-Wei, > > Collections#emptySet returns an immutable Set, so it should be >

Re: Can Cassandra trigger delete or update data right after they are inserted?

2021-09-28 Thread Angelo Polo
Hi Yu-Wei, Collections#emptySet returns an immutable Set, so it should be mutations.add(mutation); that's throwing the UnsupportedOperationException rather than anything related to C*. If you're going to add something to a set later, use the regular constructor. Most likely HashSet: new HashSet<>

Can Cassandra trigger delete or update data right after they are inserted?

2021-09-28 Thread Yu-Wei Su
Hi, I am thinking of using the Cassandra trigger to delete or update data right after they are inserted. First, I tried deleting the data. This is my table. ``` CREATE TABLE mykeyspace.mytable ( mycolumn text PRIMARY KEY ) ``` and this is my trigger ``` public class MyTrigger implements I