启动Apache Ignite客户端(Ignite版本2.3.0 )时,连接到(单个)群集节点一开始似乎可以正常工作。但是我得到了下面的异常
Jan 04, 2018 5:18:23 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Failed to process custom exchange task: ClientCacheChangeDummyDiscoveryMessage [reqId=c1d6d9fd-a2be-4826-9459-05912ad1f5a5, cachesToClose=null, startCaches=[risfahrt_v5_matched_intern_partitioned_by_fahrtid]]
java.lang.NullPointerException
at org.apache.ignite.internal.processors.cache.CacheGroupContext.<init>(CacheGroupContext.java:191)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCacheGroup(GridCacheProcessor.java:1850)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1792)
at org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.processClientCacheStartRequests(CacheAffinitySharedManager.java:428)
at org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.processClientCachesChanges(CacheAffinitySharedManager.java:611)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.processCustomExchangeTask(GridCacheProcessor.java:338)
at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.processCustomTask(GridCachePartitionExchangeManager.java:2142)
at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2231)
at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at java.lang.Thread.run(Thread.java:745)Ignite客户端按如下方式启动:
IgniteConfiguration igniteConfiguration = new IgniteConfiguration();
igniteConfiguration.setClientMode(clientMode);
TcpDiscoverySpi tcpDiscoverySpi = new TcpDiscoverySpi();
TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
ipFinder.setAddresses(servers);
tcpDiscoverySpi.setIpFinder(ipFinder);
igniteConfiguration.setDiscoverySpi(tcpDiscoverySpi);
Ignite ignite = Ignition.start(igniteConfiguration);缓存配置如下:
CacheConfiguration<String, V> cacheConfiguration = new CacheConfiguration<>();
cacheConfiguration.setName(cacheName);
cacheConfiguration.setCacheMode(CacheMode.PARTITIONED);
NearCacheConfiguration<String, V> nearCacheConfiguration = new NearCacheConfiguration<>();
nearCacheConfiguration.setNearEvictionPolicy(new LruEvictionPolicy<>(nearCacheSize));
IgniteCache<String, V> cache = ignite.getOrCreateCache(cacheConfiguration, nearCacheConfiguration);发布于 2018-01-09 16:00:45
解决方案是在缓存名称中避免下划线("_")。在这样做之后,所有的工作都没有问题。
https://stackoverflow.com/questions/48098351
复制相似问题