Java Client:::
TcpDiscoverySpi spi = new TcpDiscoverySpi();
TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
ipFinder.setAddresses(Arrays.asList("172.26.116.216"));
spi.setIpFinder(ipFinder);
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setGridName("Kodiak|Data|Grid");
cfg.setClientMode(true);
cfg.setDiscoverySpi(spi);
CacheConfiguration cacheCfg = new CacheConfiguration();
cacheCfg.setName(cacheId);
cacheCfg.setAtomicWriteOrderMode(CacheAtomicWriteOrderMode.CLOCK);
cacheCfg.setCacheMode(CacheMode.PARTITIONED);
cacheCfg.setBackups(1);
cfg.setCacheConfiguration(cacheCfg);
System.out.println("cfg =="+cfg);
Ignite ignite = Ignition.start(cfg);
// Put values in cache.
IgniteCache<Integer, String> cache =
ignite.getOrCreateCache("myCache");
System.out.println("Cache Name :::" + cache);
cache.put(1, "Hello");
cache.put(2, "World!");
System.out.println("Cache Name
------------------------------------------------------------------:::" );
// Get values from cache
// Broadcast 'Hello World' on all the nodes in the cluster.
ignite.compute().broadcast(()->System.out.println(cache.get(1) + "
" +
cache.get(2)));
========================================
[14:03:17] Initial heap size is 128MB (should be no less than 512MB, use
-Xms512m -Xmx512m).
[14:03:19] Configured plugins:
[14:03:19] ^-- None
[14:03:19]
[14:03:21] Security status [authentication=off, tls/ssl=off]
[14:03:38] Performance suggestions for grid 'Kodiak|Data|Grid' (fix if
possible)
[14:03:38] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[14:03:38] ^-- Decrease number of backups (set 'backups' to 0)
[14:03:38]
[14:03:38] To start Console Management & Monitoring run
ignitevisorcmd.{sh|bat}
[14:03:38]
[14:03:38] Ignite node started OK (id=dd6ee660, grid=Kodiak|Data|Grid)
[14:03:38] Topology snapshot [ver=5, servers=2, clients=3, CPUs=6,
heap=7.3GB]
Cache Name :::IgniteCacheProxy [delegate=GridDhtAtomicCache [near=null,
super=GridDhtCacheAdapter [multiTxHolder=java.lang.ThreadLocal@748741cb,
super=GridDistributedCacheAdapter [super=GridCacheAdapter
[aff=org.apache.ignite.internal.processors.cache.affinity.GridCacheAffinityImpl@4e928fbf,
igfsDataCache=false, mongoDataCache=false, mongoMetaCache=false,
igfsDataCacheSize=null, igfsDataSpaceMax=0,
asyncOpsSem=java.util.concurrent.Semaphore@352ff4da[Permits = 500],
name=myCache, size=0]]]], opCtx=null]
Exception in thread "main"
org.apache.ignite.cache.CachePartialUpdateException: Failed to update keys
(retry update if possible).: [2]
at
org.apache.ignite.internal.processors.cache.GridCacheUtils.convertToCacheException(GridCacheUtils.java:1488)
at
org.apache.ignite.internal.processors.cache.IgniteCacheProxy.cacheException(IgniteCacheProxy.java:2021)
at
org.apache.ignite.internal.processors.cache.IgniteCacheProxy.put(IgniteCacheProxy.java:1221)
at com.ignite.IgniteJobStore.initialize(IgniteJobStore.java:159)
at
org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:1321)
at
org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1525)
at com.redislabs.quartz.Test.createAndStartScheduler(Test.java:110)
at com.redislabs.quartz.Test.main(Test.java:41)
Caused by: class
org.apache.ignite.internal.processors.cache.CachePartialUpdateCheckedException:
Failed to update keys (retry update if possible).: [2]
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture.onResult(GridNearAtomicSingleUpdateFuture.java:232)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture.onSendError(GridNearAtomicSingleUpdateFuture.java:498)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture.mapSingle(GridNearAtomicSingleUpdateFuture.java:480)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture.map(GridNearAtomicSingleUpdateFuture.java:569)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture.mapOnTopology(GridNearAtomicSingleUpdateFuture.java:441)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateFuture.map(GridNearAtomicAbstractUpdateFuture.java:207)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$22.apply(GridDhtAtomicCache.java:1015)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$22.apply(GridDhtAtomicCache.java:1013)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.asyncOp(GridDhtAtomicCache.java:711)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAsync0(GridDhtAtomicCache.java:1013)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.putAsync0(GridDhtAtomicCache.java:483)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.putAsync(GridCacheAdapter.java:2541)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.put(GridDhtAtomicCache.java:460)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.put(GridCacheAdapter.java:2215)
at
org.apache.ignite.internal.processors.cache.IgniteCacheProxy.put(IgniteCacheProxy.java:1214)
... 5 more
Suppressed: class org.apache.ignite.IgniteCheckedException: Failed to
update keys on primary node.
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateResponse.addFailedKeys(GridNearAtomicUpdateResponse.java:370)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture.onSendError(GridNearAtomicSingleUpdateFuture.java:496)
... 18 more
Suppressed: class org.apache.ignite.IgniteCheckedException:
Failed to send
message (node may have left the grid or TCP connection cannot be established
due to firewall issues) [node=TcpDiscoveryNode [id=4f
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/Not-able-to-store-key-value-on-remote-ignite-instances-tp8816.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.