I didn't exactly get 1), but I'm sure your best bet is to use keyConfiguration (CacheKeyConfiguration) in this case to set affinity key. Otherwise you're at risk of getting "incompatible affinity keys" error.

BTW isn't it a better topic for dev@? Care to crosspost?


Ilya Kasnacheev

2018-05-09 14:46 GMT+03:00 aealexsandrov <aealexsandrov@gmail.com>:
Hi again,

We already discussed about it recently. At the moment some things works
incorrect in 2.4:

1)Rest API only support String as key and value. And looks like you can't
use affinity key on strings for the same issue. But if you can setup it
using AffinityKeyMapper anotation:

    public static class Key {
        @QuerySqlField(index = true)
        private final Stringkey;

        public Key(Stringkeykey) {
            this.key = key;

        public Stringkey getKey() {
            return key;

And put it:

CacheConfiguration<Key, Person> cfg = new CacheConfiguration<>("cache");

It should work like example from here:


2)qryexe doesn't work correct. At some reason it ignores _key and _value
fields. Looks like it could be solved in future releases.

How I am going to show you some working examples how you avoid second


1)qryfldexe - exactly the same that you want but had another syntax:

Here -
is select firstName, lastName from Person where _key = 1 or _key = 3


2)get command return the value of some key:


3)getall command return several values for some keys


Hope that it will help you.


Sent from: http://apache-ignite-users.70518.x6.nabble.com/