Re: Iterating over state entries

2018-02-20 Thread Fabian Hueske
Hi Ken, That's correct. The iterator will become invalid once you leave the method. If you are only interested in a few specific entries than index access is probably the most efficient approach. Best, Fabian 2018-02-20 1:03 GMT+01:00 Ken Krugler : > Hi Till, > > On Feb 19, 2018, at 8:14 AM, Ti

Re: Iterating over state entries

2018-02-19 Thread Ken Krugler
Hi Till, > On Feb 19, 2018, at 8:14 AM, Till Rohrmann wrote: > > Hi Ken, > > just for my clarification, the `RocksDBMapState#entries` method does not > satisfy your requirements? This method does not allow you to iterate across > different keys of your keyed stream of course. But it should al

Re: Iterating over state entries

2018-02-19 Thread Ken Krugler
Hi Fabian, > I'd like to clarify what I said before. > > By using MapState mainly gain two things: > - position access by index > - the full list does not need to be deserialized to read values (which is how > ListState works). > > Point access should obviously done by get(index). > However, i

Re: Iterating over state entries

2018-02-19 Thread Till Rohrmann
Hi Ken, just for my clarification, the `RocksDBMapState#entries` method does not satisfy your requirements? This method does not allow you to iterate across different keys of your keyed stream of course. But it should allow you to iterate over the different entries for a given key of your keyed st

Re: Iterating over state entries

2018-02-19 Thread Fabian Hueske
Hi Ken, I'd like to clarify what I said before. By using MapState mainly gain two things: - position access by index - the full list does not need to be deserialized to read values (which is how ListState works). Point access should obviously done by get(index). However, iterating over the list

Iterating over state entries

2018-02-18 Thread Ken Krugler
Hi there, I’ve got a MapState where I need to iterate over the entries. This currently isn’t supported (at least for Rocks DB), AFAIK, though there is an issue/PR to improve this. The best solution I’ve seen is what Fabian proposed, which invol