简体   繁体   English

分布式地图条目的Hazelcast分区重新改组

[英]Hazelcast partition re-shuffling of distributed map entries

When a new member joins a cluster, Hazelcast will shuffle the partition by re-distributing the entries of a distributed map. 当新成员加入集群时,Hazelcast将通过重新分配分布式映射的条目来对分区进行混洗。 Is there anyway we can be notified of such an "entry migration"? 无论如何,是否可以通知我们这种“入境迁移”?

Like we can have local entry listeners to know addition and removal of local entries. 就像我们可以让本地条目侦听器知道本地条目的添加和删除一样。 Any such way to be notified of entry migration 任何此类通知条目迁移的方式

Well I found my answer after some more googling. 好吧,经过更多的谷歌搜索后,我找到了答案。

This link here puts forth a very important point. 这里的链接提出了非常重要的一点。 Local listener is an EntryListener that just notifies on local/owned entries' map events. 本地侦听器是一个EntryListener,它仅通知本地/拥有的条目的地图事件。 Map events are about IMap operations such 'put', 'remove'. 地图事件与IMap操作有关,例如“放置”,“删除”。

What that implies is, we cannot expect to get a local entry added event fired when new local entries are added due to migration. 这意味着,由于迁移而添加新的本地条目时,我们不能期望触发本地条目添加事件。 That shook my belief! 这动摇了我的信念! And I still strongly agree with the creator of this issue, that it should. 我仍然坚决同意这个问题的产生者。

Workaround present, is as described in this mailing list entry by using this partition service and migration listener trick. 使用此分区服务和迁移侦听器技巧,如本邮件列表条目中所述,存在解决方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM