You need to create a cache template (a cache configuration with a name ending with a *), and specify that in the CREATE TABLE. To define a cache template: <property name="cacheConfiguration"> <list> <bean class="org.apache.ignite.configuration.CacheConfiguration"> <property name="name" value="excludeNeighbors*"/> <property name="affinity"> <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction"> <property name="excludeNeighbors" value="true"/> </bean> </property> </bean> </list> </property>
To use it in CREATE TABLE: CREATE TABLE FOO (...) WITH "template=excludeNeighbors"; Stan From: Naveen Sent: 22 марта 2018 г. 8:17 To: user@ignite.apache.org Subject: RE: Is backup copy always stored on different host - is ithost-awarereplication Thanks Stan. I am creating the cache thru SQL DDL with below statement CREATE TABLE MAP_ASSOCIATED (PARTY_ID VARCHAR, ASSOCIATED_LIST VARCHAR, UPDATEDDATETIME TIMESTAMP, UPDATEDBY VARCHAR, PRIMARY KEY (PARTY_ID))WITH "template=partitioned,backups=1,cache_name=MAP_ASSOCIATED, value_type=com.ril.edif.model.MAP_ASSOCIATED"; So how do I specify the cacheConfiguration.setAffinity(new RendezvousAffinityFunction(true)) Objective is to keep the backup on different host Thanks Naveen -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/