Search code examples
javagemfiregeode

Cursor equivalent for Gemfire?


I use Gemfire 8.x and I have a Gemfire region where there are many objects in it (let's say there are billions of them) and I need to write some Java code which does some kind of bulk processing with a huge result set from the region.

If it was a traditional RDBMS, I would use a cursor for that so that I won't get an OutOfMemoryError. Is there an equivalent in Gemfire? Or do I have to implement some kind of custom paging logic with the LIMIT keyword in OQL for implementing this kind of bulk processing with a large result set?


Solution

  • There's no CURSOR equivalent in GemFire, you need to retrieve the results using LIMIT instead. As a side note, it would be beneficial (and probably better) to write a custom Function instead of using OQL from a client application, that will allow you to process the data in place and prevent the whole data set from moving to the client side.

    Cheers.