Andrey,

Good to hear from you. Long time no talk.

I don't think invokeAll has only update semantics. You can definitely use
it just to look at the keys and return a result. Also, as you mentioned,
Ignite compute is a viable option as well.

The reason that predicates were removed from the get methods is because the
API was becoming unwary, and also because JCache does not require it.

D.

On Thu, Aug 24, 2017 at 10:50 AM, Andrey Kornev <andrewkor...@hotmail.com>
wrote:

> Well, I believe invokeAll() has "update" semantics and using it for
> read-only filtering of cache entries is probably not going to be efficient
> or even appropriate.
>
>
> I'm afraid the only viable option I'm left with is to use Ignite's Compute
> feature:
>
> - on the sender, group the keys by affinity.
>
> - send each group along with the filter predicate to their affinity nodes
> using IgniteCompute.
>
> - on each node, use getAll() to fetch the local keys and apply the filter.
>
> - on the sender node, collect the results of the compute jobs into a map.
>
>
> It's unfortunate that Ignite dropped that original API. What used to be a
> single API call is now a non-trivial algorithm and one have to worry about
> things like what happens if the grid topology changes while the compute
> jobs are executing, etc.
>
> Can anyone think of any other less complex/more robust approach?
>
> Thanks
> Andrey
>
> ------------------------------
> *From:* slava.koptilin <slava.kopti...@gmail.com>
> *Sent:* Thursday, August 24, 2017 9:03 AM
> *To:* user@ignite.apache.org
> *Subject:* Re: Retrieving multiple keys with filtering
>
> Hi Andrey,
>
> Yes, you are right. ScanQuery scans all entries.
> Perhaps, IgniteCache#invokeAll(keys, cacheEntryProcessor) with custom
> processor will work for you.
> https://ignite.apache.org/releases/2.1.0/javadoc/org/
> apache/ignite/IgniteCache.html#invokeAll(java.util.Set,%
> 20org.apache.ignite.cache.CacheEntryProcessor,%20java.lang.Object...)
>
> Thanks!
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Retrieving-multiple-keys-with-
> filtering-tp16391p16400.html
> Apache Ignite Users - Retrieving multiple keys with filtering
> <http://apache-ignite-users.70518.x6.nabble.com/Retrieving-multiple-keys-with-filtering-tp16391p16400.html>
> apache-ignite-users.70518.x6.nabble.com
> Retrieving multiple keys with filtering. Hello, I have a list of cache
> keys (up to a few hundred of them) and a filter predicate. I'd like to
> efficiently retrieve only those values that pass the...
>
>
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Reply via email to