我正在使用3.6.1版本(Java 8)。 在localhost(tcp config)上运行2个实例。 当第一个实例启动并运行一些数据时,我正在启动第二个实例。它加入集群,但在“加载所有密钥”时立即失败 -
31, 2016 6:11:33 PM com.hazelcast.map.impl.recordstore.DefaultRecordStore
INFO: [localhost]:5701 [CoreCluster] [3.6.1] Starting to load all keys for map sentAlerts on partitionId=64
31, 2016 6:11:33 PM com.hazelcast.map.impl.operation.LoadStatusOperation
SEVERE: [localhost]:5701 [CoreCluster] [3.6.1] Transition not allowed from state NOT_LOADED to LOADED
java.lang.IllegalStateException: Transition not allowed from state NOT_LOADED to LOADED
at com.hazelcast.util.Preconditions.checkState(Preconditions.java:313)
at com.hazelcast.util.StateMachine.next(StateMachine.java:60)
at com.hazelcast.util.StateMachine.nextOrStay(StateMachine.java:70)
at com.hazelcast.map.impl.MapKeyLoader.trackLoading(MapKeyLoader.java:228)
at com.hazelcast.map.impl.recordstore.DefaultRecordStore.updateLoadStatus(DefaultRecordStore.java:115)
at com.hazelcast.map.impl.operation.LoadStatusOperation.run(LoadStatusOperation.java:48)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:172)
at com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.processOperation(OperationThread.java:198)
at com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.process(OperationThread.java:132)
at com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.doRun(OperationThread.java:124)
at com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.run(OperationThread.java:99)
任何想法都将受到赞赏。
修改:配置代码段
private static HazelcastInstance buildHazelcastInstance() {
Config config = new Config().setGroupConfig(
new GroupConfig().setName("cluster"));
config.setNetworkConfig(new NetworkConfig().setJoin(new JoinConfig().setMulticastConfig(new MulticastConfig().setEnabled(false))
.setTcpIpConfig(new TcpIpConfig().setEnabled(true).setMembers(Arrays.asList("localhost")))));
return Hazelcast.newHazelcastInstance(config);
}
Edit2:该实例还有MongoMapStore,它是MapStore的实现。当我没有设置MapStoreConfig时,实例工作正常(第二次加入并能够读取第一个的数据),但如果我重新启用MapStoreConfig,则再次引发异常......