无法在持久 hazelcast 地图上指定索引
我们最近开始将 hazelcast 地图持久性与我们自己的 MapStore
实现一起使用。通过这个实现,我们将数据存储在一个地图中,该地图有一些索引来加速对存储在其中的对象的查询,如文档中所述:
IMap imap = Hazelcast.getMap("employees");
imap.addIndex("age", true);
现在的问题是,通过初始化此地图,MapStore
加载器方法被自动调用,用一些初始值填充地图。在这一步之后,就不可能设置索引了,因为这似乎是被禁止的非空映射。因此,我们目前无法在持久映射上使用索引。
是否有任何解决方法,或者计划允许在非空映射上添加索引?
we started using the hazelcast map persistency with our own implementation of MapStore
recently. With this implementation we store data in a map which has some indexes to speed up queries on the objects stored in it, like explained in the docu:
IMap imap = Hazelcast.getMap("employees");
imap.addIndex("age", true);
Now the problem is, that by initializing this Map the MapStore
loader method is called automatically, filling the map with some initial values. After this step, it is impossible to set up indexes, because this seems to be forbidden an a non-empty map. So, we have currently no possibility to use indexes on persistent maps.
Is there any workaround, or is is planned to allow adding indexes on non-empty maps?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个已知问题,请参阅:http://code.google。 com/p/hazelcast/issues/detail?id=574
This is a known issue, please see: http://code.google.com/p/hazelcast/issues/detail?id=574