apache spark - Retrieve Previous Stateful Stream without mapWithState/updateStateByKey -


i working on program using spark streaming, keep stateful key-value paired stream following format:

k: {v1,v2} 

where k key , {v1,v2} value/state. whenever there new data coming in, e.g. k:{v3}, state of k updated either mapwithstate or updatestatebykey api.

k:{v1,v2,v3}  

i know within mapwithstate, able previous state {v1,v2} , utilize state.exist() or state.update(). there way retrieve state variable outside of mapwithstate?


Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -