You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Craig Vanderborgh <cr...@gmail.com> on 2014/01/27 16:24:29 UTC

updateStateByKey Question

Hello,

I'm a big fan of updateStateByKey(), have been using it for a year, and now
need to push the envelope again.

My question is simply this:  Can I use updateStateByKey in the following
way?

states = events.updateStateByKey[State](firstUpdateFcn)

<do some other stuff>

states2 = events.updateStateByKey[State](secondUpdateFcn)

That is, can I call updateStateByKey TWICE OR MORE IN THE SAME ITERATION,
and be able to make additional updates to the state objects as needed?

Thanks,
Craig Vanderborgh