Hi Shimi, Did you pass in a state store name for the windowed example? E.g., if you are doing "count" or another aggregate, you can pass in a desired state store name.
Thanks Eno > On 15 Feb 2017, at 00:35, Shimi Kiviti <shim...@gmail.com> wrote: > > Hello, > > I have a code that access a state store in order to get the latest value of > a specific key. In a case of a regular KTable<K,> the store name is the > same store name that was passed together with the aggregator and there is > no problem accessing this store. > In the case of a Windowed KTable, I can't access the sate store and I get > following error > > "the state store, STORAGE, may have migrated to another instance." > > I am using a daily window: > Windows<TimeWindow> windows = TimeWindows > .of(TimeUnit.DAYS.toMillis(1)) > .until(TimeUnit.DAYS.toMillis(31)); > > I don't know if it is matter but I noticed that the the file structure on > the disk is different. > Without windowed it is: 1_0/rocksdb/STORAGE > With windowed it i: 1_0/STORAGE/STORAGE-201701231200 > and the date at the end, had nothing to do with my records. > > I am assuming that the state store is given a different name when used with > time widows. The question is how to get a hold on that name? > > Thanks, > Shimi