Re: saving distinct data in cassandra result in many tombstones

2018-06-19 Thread shalom sagges
1. How to use sharding partition key in a way that partitions end up in different nodes? You could, for example, create a table with a bucket column added to the partition key: Table distinct( hourNumber int, bucket int, //could be a 5 minute bucket for example key text, distinctValue long primary

Re: saving distinct data in cassandra result in many tombstones

2018-06-18 Thread onmstester onmstester
Two other questions: 1. How to use sharding partition key in a way that partitions end up in different nodes? 2. if i set gc_grace_seconds to 0, would it replace the row at memtable (not saving repeated rows in sstables) or it would be done at first compaction? Sent using Zoho Mail

Re: saving distinct data in cassandra result in many tombstones

2018-06-18 Thread onmstester onmstester
Can i set gc_grace_seconds to 0 in this case? because reappearing deleted data has no impact on my Business Logic, i'm just either creating a new row or replacing the exactly same row. Sent using Zoho Mail On Wed, 13 Jun 2018 03:41:51 +0430 Elliott Sims wro

Re: saving distinct data in cassandra result in many tombstones

2018-06-12 Thread Elliott Sims
If this is data that expires after a certain amount of time, you probably want to look into using TWCS and TTLs to minimize the number of tombstones. Decreasing gc_grace_seconds then compacting will reduce the number of tombstones, but at the cost of potentially resurrecting deleted data if the ta

saving distinct data in cassandra result in many tombstones

2018-06-12 Thread onmstester onmstester
Hi, I needed to save a distinct value for a key in each hour, the problem with saving everything and computing distincts in memory is that there are too many repeated data. Table schema: Table distinct( hourNumber int, key text, distinctValue long primary key (hourNumber) ) I want t