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
Post a Comment