简体   繁体   中英

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. 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. Map events are about IMap operations such 'put', 'remove'.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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