Hi, what seems to be the problem? Cheers, Aljoscha
On Wed, 20 Apr 2016 at 03:52 Jack Huang <jackhu...@machinezone.com> wrote: > Hi all, > > I am doing a simple word count example and want to checkpoint the > accumulated word counts. I am not having any luck getting the counts saved > and restored. Can someone help? > > env.enableCheckpointing(1000) > > env.setStateBackend(new MemoryStateBackend()) > > >> ... > > > > inStream >> .keyBy({s => s}) >> >> >> >> *.mapWithState((in:String, count:Option[Int]) => { val newCount = >> count.getOrElse(0) + 1 ((in, newCount), Some(newCount)) })* >> .print() > > > > Thanks, > > Jack Huang >