ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Rudyak <irud...@gmail.com>
Subject Re: Cassandra Cache Store Example
Date Thu, 14 Jul 2016 23:43:38 GMT
Hi Kamal,

Ignite Cassandra module takes into account AffinityFunction when persisting
values into Cassandra(https://apacheignite.readme.io/docs/overview). Thus
key/values having the same Affinity and collocated on one Ignite node will
be also collocated on one node in Cassandra.

Cassandra and Ignite partitions are two absolutely different animals, it
doesn't make sense to compare them. Just check that you are using
@AffinityKeyMapped annotation for your key classes. In a such way all the
values having same affinity will be persisted on the same Cassandra node.

Igor Rudyak


On Thu, Jul 14, 2016 at 4:12 PM, vkulichenko <valentin.kulichenko@gmail.com>
wrote:

> Hi Kamal,
>
>
> Kamal wrote
> > 1. In Ignite partitioned cache, number of partitions can be configured
> >    using AffinityFunction. How to configure the same for the
> >    Cassandra table ?
> >
> > 2. Will the partitioner used by Cassandra (MurMur3) and the Ignite
> >     returns the same partition number for a cache key ?
>
> Ignite and Cassandra use completely different partitioning strategy and I
> don't think it will be an easy task to collocate them. But from my
> experience, it's actually better not to do this, but have Cassandra and
> Ignite on separate physical servers and scale them separately. Most likely
> you will need different number of nodes for Ignite and Cassandra to fit
> your
> performance requirements.
>
>
> Kamal wrote
> > 3. Say a cache is configured to hold 2 lakh elements in memory
> >     and rest of them in cassandra. If the cache contains more than
> >     2 lakh elements, Then,
> >
> > a. Calling cache.size() method returns count as 2 lakh
> > b. Using cache.iterator() able to iterate only the elements available
> >     in the memory
> > c. With cache.removeAll() able to delete the entries in cassandra
> >     that are available in the memory.
>
> Answer on all the three questions is YES.
>
>
> Kamal wrote
> > How to get the total size of a cache ? (memory + cassandra)
>
> Data which is evicted from Ignite is not in cache anymore. You have to use
> Cassandra APIs to get the number entries in its storage.
>
> -Val
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Cassandra-Cache-Store-Example-tp6206p6315.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Mime
View raw message