You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Riccardo Iacomini <ri...@rdslab.com> on 2016/12/02 14:29:46 UTC

Cassandra cache info

I would like to ask some info about the Cassandra integration I could not
find in the documentation.

   - Is there a way one could use ignite cache selectively on one or more
   particular cassandra's tables, and still query all the data using only the
   Ignite driver? I mean, can I set a table simply not to be retained in the
   Ignite cache, or I need to query the data selectively using the Cassandra
   driver or the Ignite driver according to the table to be accessed?

   - Can I configure the size of a cache backed up by a Cassandra table?


   - How are Cassandra's secondary indexes managed under the hood?

In general, I would like to understand if the Cassandra integration is
meant to be used transparently (therefore thinking in terms of Cassandra's
underlying storage), or
once set up the mapping I should think in terms of Ignite cache elements.

Thank you in advance for the information.

Riccardo Iacomini


*RDSLab*

Re: Cassandra cache info

Posted by Igor Rudyak <ir...@gmail.com>.
Hi Riccardo,

It depends on how you are asking for the record which is not in Ignite
cache. If you are doing this using *get* method of Ignite cache API it will
load this record from DB (if it's not already in Ignite cache), put it into
in-memory cache and return it to you.

But if you are using Ignite SQL and trying to obtain record using something
like this: *select * from my-cache where id=123 , * it will return you
nothing if such specific record wasn't already loaded into cache.

Igor

On Mon, Dec 5, 2016 at 8:14 AM, Riccardo Iacomini <
riccardo.iacomini@rdslab.com> wrote:

> Hi Val,
> I have a related question regarding SQL queries. Does it mean that it
> cannot be used as cache layer for an operational DB? What if I ask for a
> record which is not currently in the cache, but is stored in the
> persistence DB? Will a get an empty result set or Ignite will ask it to the
> DB?
>
> Thank you in advance for the response. I looks like a silly question but I
> would like to be sure I got the use case for the SQL case.
>
>
>
> Riccardo Iacomini
>
>
> *RDSLab*
>
> On Fri, Dec 2, 2016 at 6:35 PM, vkulichenko <valentin.kulichenko@gmail.com
> > wrote:
>
>> Hi Riccardo,
>>
>> If you are working with SQL queries, then you have to load all required
>> data
>> into Ignite in advance. Ignite will not go to Cassandra in this case and
>> will return the result based only on entries that are already in caches.
>>
>> However, if you use key-value API, both read-through and write-through are
>> available. I.e. when you read an entry using get() method providing a key,
>> Ignite will load value for this key from Cassandra in case it's not in the
>> cache yet.
>>
>> -Val
>>
>>
>>
>> --
>> View this message in context: http://apache-ignite-users.705
>> 18.x6.nabble.com/Cassandra-cache-info-tp9370p9372.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>
>
>

Re: Cassandra cache info

Posted by Riccardo Iacomini <ri...@rdslab.com>.
Hi Val,
I have a related question regarding SQL queries. Does it mean that it
cannot be used as cache layer for an operational DB? What if I ask for a
record which is not currently in the cache, but is stored in the
persistence DB? Will a get an empty result set or Ignite will ask it to the
DB?

Thank you in advance for the response. I looks like a silly question but I
would like to be sure I got the use case for the SQL case.



Riccardo Iacomini


*RDSLab*

On Fri, Dec 2, 2016 at 6:35 PM, vkulichenko <va...@gmail.com>
wrote:

> Hi Riccardo,
>
> If you are working with SQL queries, then you have to load all required
> data
> into Ignite in advance. Ignite will not go to Cassandra in this case and
> will return the result based only on entries that are already in caches.
>
> However, if you use key-value API, both read-through and write-through are
> available. I.e. when you read an entry using get() method providing a key,
> Ignite will load value for this key from Cassandra in case it's not in the
> cache yet.
>
> -Val
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Cassandra-cache-info-tp9370p9372.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: Cassandra cache info

Posted by vkulichenko <va...@gmail.com>.
Hi Riccardo,

If you are working with SQL queries, then you have to load all required data
into Ignite in advance. Ignite will not go to Cassandra in this case and
will return the result based only on entries that are already in caches.

However, if you use key-value API, both read-through and write-through are
available. I.e. when you read an entry using get() method providing a key,
Ignite will load value for this key from Cassandra in case it's not in the
cache yet.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Cassandra-cache-info-tp9370p9372.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.