ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Gura <ag...@gridgain.com>
Subject Re: get the all values stored into cache name?
Date Tue, 19 Jan 2016 14:00:31 GMT
Ravi,

if you still want to get all data despite Alexey recommendations then you
can just use iterator() method on cache instance. This equals to ScanQuery
creation.

On Tue, Jan 19, 2016 at 1:04 PM, Alexey Goncharuk <
alexey.goncharuk@gmail.com> wrote:

> Ravi,
>
> IgniteCache does not have a method like getAll() because this can simply
> trigger an OOME on the node that receiving the data.
>
> If you want to process all entries on a single node, you can use
> IgniteCache#query() method and pass an instance of ScanQuery object to this
> method. Resulting cursor will allow you to iterate over cache entries. You
> can refer to [1] for more details.
>
> Note that, generally, such an approach is not very efficient because you
> are sending a lot of data across the network. You may want to exploit
> Ignite compute functionality and collocate your computations with data. In
> this case only small objects responsible for the computations and
> computation results will be sent across the network. The approach is
> described in [2]
>
> Hope this helps,
> AG
> ------
> [1] https://apacheignite.readme.io/docs/cache-queries
> [2] https://apacheignite.readme.io/docs/collocate-compute-and-data
>
>


-- 
Andrey Gura
GridGain Systems, Inc.
www.gridgain.com

Mime
View raw message