I need to take the value from a RDD and update the state of the other RDD. Is this possible?
On 22 October 2015 at 16:06, Uthayan Suthakar <uthayan.sutha...@gmail.com> wrote: > Hello guys, > > I have a stream job that will carryout computations and update the state > (SUM the value). At some point, I would like to reset the state. I could > drop the state by setting 'None' but I don't want to drop it. I would like > to keep the state but update the state. > > > For example: > > JavaPairDStream<String, String> updatedResultsState = > streamLogs.updateStateByKey(updateResultsStream); > > At some condition, I would like to update the state by key but with the > different values, hence different update function. > > > e.g. > > updatedResultsState = newData.updateStateByKey(resetResultsStream); > > But the newData.updateStateByKeyvalues cannot be replaced with the value > in streamLogs.updateStateByKey. Do you know how I could replace the state > value in streamLogs with newData. > > Is this possible? > > > > > >