从EntryProcessor访问IMAP(accessing IMap from EntryPro

2019-10-23 10:30发布

可以IMAP或类似的AtomicLong其他Hazelcast分布式数据结构来从EntryProcessor的过程()方法内访问?

我得到以下异常:

java.util.concurrent.ExecutionException: java.lang.IllegalThreadStateException: Thread[hz.Alcatraz-ANP-Sys-HAZLE-2.actiance.local.partition-operation.thread-5,5,Alcatraz-ANP-Sys-HAZLE-2.actiance.local] cannot make remote call: com.hazelcast.concurrent.lock.operations.LockOperation@3229190f
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.7.0_51]
at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[na:1.7.0_51]
at com.hazelcast.executor.impl.DistributedExecutorService$CallableProcessor.run(DistributedExecutorService.java:189) ~[hazelcast-3.3_actiance.jar:3.3]
at com.hazelcast.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:209) [hazelcast-3.3_actiance.jar:3.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]
at com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76) [hazelcast-3.3_actiance.jar:3.3]
at com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:92) [hazelcast-3.3_actiance.jar:3.3]

我使用Hazelcast 3.3版本

Answer 1:

您可以访问其他的数据结构,但你需要确保他们在相同的数据分区作为当前处理条目。 这意味着可以在同一个分区使用(例如)数据亲和力到引脚的所有数据一起。

不同分区之间共享IAtomicLong是不可能的,但。

PS:你也应该不会,因为它可能会在不同节点之间的僵局最终变异比目前的处理进入其他数据。



文章来源: accessing IMap from EntryProcessor
标签: hazelcast