Have hazelcast predicate return sorted collection

不问归期 提交于 2019-12-25 03:32:37

问题


is there a way to get a sorted collection from a hazelcast predicate? i have found that hazelcast offers a pagingpredicate for this purpose but i am not interested in the paging behavior (at least for now).

even if one does use this pagingpredicate, does it make sure that the whole collection is sorted and not just the items in a particular page? and also if there is any way to disable the paging completely?

i am interested in getting the results in sorted form and not in sorting the distributed data structure.

thank you


回答1:


i ran a few tests with pagingpredicate and it did exactly what i wanted.

pagesize should be selected carefully. small page size with big data can cause huge number of comparisons with lots of data travel between hazelcast nodes.

at the end, all the items in the resulting collection are perfectly sorted, including the ones in any given page of course.

hope someone will find it useful.



来源:https://stackoverflow.com/questions/29968146/have-hazelcast-predicate-return-sorted-collection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!