get the all values stored into cache name?
Ignite<object,object> cachedata=ignite.getOrCreateCache(cacheName) entered the data into cachedata.put() how to get all data using cacheName from cachedata?? -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/get-the-all-values-stored-into-cache-name-tp2631.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: get the all values stored into cache name?
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
Re: get the all values stored into cache name?
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.goncha...@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