I followed the below post
http://apache-ignite-users.70518.x6.nabble.com/Failed-to-start-near-cache-a-cache-with-the-same-name-without-near-cache-is-already-started-td18322.htmlbut it did not solve my problem, hence requesting for help.
I tried two options
a) Start ignite with below xml config and then call
this.ignite.getOrCreateNearCache("MyCache", nearCfg);
b) Start ignite with below xml config and then call
this.ignite.getOrCreateCache("MyNearCache"); and then
this.ignite.getOrCreateNearCache("MyNearCache", nearCfg);
Both are giving error like "Failed to start near cache (a cache with the
same name without near cache is already started)". AS per doc, I just need
to pass existing cache name and pass near cfg to get near cache for client
alone. But either way I am getting exception. Can you provide how can I
create a near cache ONLY for client, but not on server
<bean id="MyCache"
class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="MyCache"/>
<property name="storeKeepBinary" value="false"/>
<property name="statisticsEnabled" value="false"/>
<property name="sqlSchema" value="PUBLIC"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="backups" value="1"/>
<property name="writeSynchronizationMode" value="FULL_SYNC"/>
<property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
<property name="affinity">
<bean
class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
<property name="excludeNeighbors" value="true"/>
</bean>
</property>
<property name="queryEntities">
<list>
<bean class="org.apache.ignite.cache.QueryEntity">
<property name="tableName" value="MyCache"/>
<property name="keyType" value="java.lang.String"/>
<property name="valueType" value="java.lang.String"/>
</bean>
</list>
</property>
</bean>
</beans>
--
Sent from:
http://apache-ignite-users.70518.x6.nabble.com/