Hazelcast无法加载地图" large"条目数量

时间:2016-12-09 17:55:33

标签: hazelcast hazelcast-imap

在尝试加载超过40000个条目的地图时,我遇到了Hazelcast的问题。

如果我将条目数量限制为大约40000,则Hazelcast可以加载地图。远远超过此范围会导致以下异常重复抛出。我正在使用Hazelcast MapLoader。无论结果大小如何,MapLoader.getAllKeys都会成功执行。为每批要加载的对象抛出异常 我使用Hazelcast版本3.7.2与单个节点。非常感谢任何帮助或指导。

09-Dec-2016 12:38:19.885 WARNING [http-nio-8088-exec-3] com.hazelcast.util.FutureUtil.null Exception occurred
 java.util.concurrent.ExecutionException: java.lang.NullPointerException
    at com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.resolveAndThrow(InvocationFuture.java:85)
    at com.hazelcast.spi.impl.AbstractInvocationFuture.get(AbstractInvocationFuture.java:186)
    at com.hazelcast.util.FutureUtil.executeWithDeadline(FutureUtil.java:326)
    at com.hazelcast.util.FutureUtil.waitWithDeadline(FutureUtil.java:310)
    at com.hazelcast.util.FutureUtil.waitWithDeadline(FutureUtil.java:284)
    at com.hazelcast.map.impl.proxy.MapProxySupport.waitUntilLoaded(MapProxySupport.java:583)
    at com.hazelcast.map.impl.proxy.MapProxyImpl.waitUntilLoaded(MapProxyImpl.java:82)
    at com.hazelcast.map.impl.proxy.MapProxySupport.initializeMapStoreLoad(MapProxySupport.java:225)
    at com.hazelcast.map.impl.proxy.MapProxySupport.initialize(MapProxySupport.java:217)
    at com.hazelcast.map.impl.proxy.MapProxyImpl.initialize(MapProxyImpl.java:82)
    at com.hazelcast.spi.impl.proxyservice.impl.ProxyRegistry.doCreateProxy(ProxyRegistry.java:180)
    at com.hazelcast.spi.impl.proxyservice.impl.ProxyRegistry.createProxy(ProxyRegistry.java:170)
    at com.hazelcast.spi.impl.proxyservice.impl.ProxyRegistry.getOrCreateProxy(ProxyRegistry.java:139)
    at com.hazelcast.spi.impl.proxyservice.impl.ProxyServiceImpl.getDistributedObject(ProxyServiceImpl.java:147)
    at com.hazelcast.instance.HazelcastInstanceImpl.getDistributedObject(HazelcastInstanceImpl.java:372)
    at com.hazelcast.instance.HazelcastInstanceImpl.getMap(HazelcastInstanceImpl.java:178)
    at com.hazelcast.instance.HazelcastInstanceProxy.getMap(HazelcastInstanceProxy.java:92)
    at com.df.repository.hazelcast.MapFactory.getOrCreateMap(DataFabricMapFactory.java:16)
Caused by: java.lang.NullPointerException
    at com.hazelcast.internal.partition.impl.InternalPartitionServiceImpl.getPartitionId(InternalPartitionServiceImpl.java:834)
    at com.hazelcast.map.impl.MapKeyLoaderUtil$2.apply(MapKeyLoaderUtil.java:113)
    at com.hazelcast.map.impl.MapKeyLoaderUtil$2.apply(MapKeyLoaderUtil.java:110)
    at com.hazelcast.util.IterableUtil$2.next(IterableUtil.java:60)
    at com.hazelcast.map.impl.MapKeyLoaderUtil.nextBatch(MapKeyLoaderUtil.java:86)
    at com.hazelcast.map.impl.MapKeyLoaderUtil$1.next(MapKeyLoaderUtil.java:76)
    at com.hazelcast.map.impl.MapKeyLoaderUtil$1.next(MapKeyLoaderUtil.java:65)
    at com.hazelcast.map.impl.MapKeyLoader.sendKeysInBatches(MapKeyLoader.java:309)
    at com.hazelcast.map.impl.MapKeyLoader.access$200(MapKeyLoader.java:72)
    at com.hazelcast.map.impl.MapKeyLoader$1.call(MapKeyLoader.java:192)
    at com.hazelcast.map.impl.MapKeyLoader$1.call(MapKeyLoader.java:189)
    at com.hazelcast.util.executor.CompletableFutureTask.run(CompletableFutureTask.java:67)
    at com.hazelcast.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:212)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    at com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76)
    at com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:92)
    at ------ submitted from ------.(Unknown Source)
    at com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.resolve(InvocationFuture.java:111)
    at com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.resolveAndThrow(InvocationFuture.java:74)
    ... 58 more

1 个答案:

答案 0 :(得分:0)

原来这80000条记录中有一条有空id。我假设列是NOT NULL是错误的。删除坏数据后,一切似乎都运行良好。