How do you configure affinityKey in xml

classic Classic list List threaded Threaded
2 messages Options
hulitao198758 hulitao198758
Reply | Threaded
Open this post in threaded view
|

How do you configure affinityKey in xml

How do you configure affinityKey in apache ignite and implement the Join
between multiple partition caches after the JDBC client connects to the
cluster?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: How do you configure affinityKey in xml

Hello!

For that, you can use keyConfiguration property on igniteCache:

<bean class="...CacheConfiguration">
<property name="keyConfiguration">
    <list>
        <bean class="org.apache.ignite.cache.CacheKeyConfiguration">
            <property name="typeName" value="ClassNameOfKey"/>
            <property name="affinityKeyFieldName"
value="fieldNameInThatClass"/>
        </bean>
    </list>
</property>
</bean>

It is poorly documented, unfortunately, I've raised submit a ticket about
that:https://issues.apache.org/jira/browse/IGNITE-8253

Regards,




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