I know that in order to clean up the state for a key I have to return None when I call updateStateByKey. However, as far as I understand, updateStateByKey only gets called for new keys (i.e. keys in current batch), not for all keys in the DStream. So, how can I clear the state for those keys in this case? Or, in other words, how can I clear the state for a key when Seq[V] is empty?
Simone Franzini, PhD http://www.linkedin.com/in/simonefranzini