The documentation for ValueStateDescriptor documents the name parameter as -
"name - The (unique) name for the state."
What is the scope of the uniqueness? Unique within an RichFunction instance?
Unique withing job? Unique within a session cluster?
I ask because I have several jobs that use a KeyedProcessFunction or
RIchFlatMapFunction in a loop. Something like
for (int t:cfg.intervals)
stream
.process(new FuncA(t))
.flatMap(new FuncB())
Where FuncA has something like the following in its open method.
state = getRuntimeContext().getState(new
ValueStateDescriptor<>("funcAState", stateTypeInfo, null));
The code seems to work fine, but I am wondering If I need to pass something in
the constructor to make the state name unique for each instance created in the
loop.
Thanks,
Eddie Colletta