1

我在 Eclipse 中使用 Hazelcast v2.5 和 Maven 插件。我尝试在 Eclipse 中运行一个示例程序,它在 ABCD 命名空间中创建了 3 个映射条目。当我在 Eclipse 中运行我的代码时,它会显示此警告消息

Feb 07, 2013 12:08:23 PM com.hazelcast.impl.ConcurrentMapManager
WARNING: [192.168.1.36]:5702 [dev] Caller -> RedoLog{name=c:ABCD, redoType=REDO_TARGET_UNKNOWN, operation=CONCURRENT_MAP_MERGE, target=null / connected=false, redoCount=53, migrating=null
partition=Partition [227]{
}
}

这会一直迭代,直到超过重做阈值。

Feb 07, 2013 12:08:42 PM com.hazelcast.impl.LifecycleServiceImpl
WARNING: [192.168.1.36]:5702 [dev] [CONCURRENT_MAP_MERGE] Redo threshold[90] exceeded! Last redo cause: REDO_TARGET_UNKNOWN, Name: c:ABCD
com.hazelcast.core.OperationTimeoutException: [CONCURRENT_MAP_MERGE] Redo threshold[90] exceeded! Last redo cause: REDO_TARGET_UNKNOWN, Name: c:ABCD
    at com.hazelcast.impl.BaseManager$ResponseQueueCall.getRedoAwareResult(BaseManager.java:640)
    at com.hazelcast.impl.BaseManager$ResponseQueueCall.getResult(BaseManager.java:627)
    at com.hazelcast.impl.BaseManager$RequestBasedCall.getResultAsBoolean(BaseManager.java:437)
    at com.hazelcast.impl.BaseManager$ResponseQueueCall.getResultAsBoolean(BaseManager.java:544)
    at com.hazelcast.impl.ConcurrentMapManager$MPut.mergeOne(ConcurrentMapManager.java:1758)
    at com.hazelcast.impl.ConcurrentMapManager$MPut.merge(ConcurrentMapManager.java:1747)
    at com.hazelcast.impl.LifecycleServiceImpl$1.run(LifecycleServiceImpl.java:143)
    at com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    at com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)

为什么会出现这种情况?

请帮忙。!

4

1 回答 1

2

您可以执行以下操作以开始使用准系统 Java 类(我建议您阅读更详细的教程,因为它可能更有用 - 我没有访问 Hazelcast 服务):

  1. 在 hazelcast.xml 文件中指定映射如下:

       <map name="testMap">     
        <backup-count>1</backup-count>
        <eviction-policy>NONE</eviction-policy>
        <max-size policy="cluster_wide_map_size">0</max-size>
        <eviction-percentage>25</eviction-percentage>
        <merge-policy>hz.ADD_NEW_ENTRY</merge-policy>
        <map-store enabled="true">
        <class-name>models.test.StoreLoadTestMap</class-name>
        <write-delay-seconds>5</write-delay-seconds> 
        </map-store>
        <entry-listeners>
        <entry-listener include value="true"local="false">models.test.ListenerTestMap</entry-listener>
         </entry-listeners>
         </map>
    

完成后,您只需从 Java 应用程序中调用以下命令:

IMap<String, testObject> testMap = Hazelcast.getMap("testMap");

现在,您应该能够根据需要在地图中放置/获取值。您可以根据您的用例使用 tcp 或多播进行复制(如果可能,使用 tcp)并从第二个映射中检索信息以确认数据复制。还请了解数据如何跨地图复制。

希望能帮助到你

于 2013-02-08T17:22:11.857 回答