Incorrect Javadoc in CheckpointedFunction.java?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Incorrect Javadoc in CheckpointedFunction.java?

chiggi_dev
Hi,

I was going through the Javadoc for CheckpointedFunction.java, it says that:

*         // get the state data structure for the per-key state
* countPerKey = context.getKeyedStateStore().getReducingState(
* new ReducingStateDescriptor<>("perKeyCount", new AddFunction<>(), Long.class));
*
* // get the state data structure for the per-key state
* countPerPartition = context.getOperatorStateStore().getOperatorState(
* new ListStateDescriptor<>("perPartitionCount", Long.class));

OperatorStateStore would not be per-key state data structure since it applies to non-keyed state. 

Is my understanding correct here?

Thanks,

Chirag
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect Javadoc in CheckpointedFunction.java?

Congxian Qiu
Hi Chirag

I think the doc is outdated, the comments in CheckpointFuncion.java on master now[1] is `get the state data structure for the per-partition state`


Best, Congxian
On Feb 15, 2019, 13:39 +0800, Chirag Dewan <[hidden email]>, wrote:
Hi,

I was going through the Javadoc for CheckpointedFunction.java, it says that:

*         // get the state data structure for the per-key state
* countPerKey = context.getKeyedStateStore().getReducingState(
* new ReducingStateDescriptor<>("perKeyCount", new AddFunction<>(), Long.class));
*
* // get the state data structure for the per-key state
* countPerPartition = context.getOperatorStateStore().getOperatorState(
* new ListStateDescriptor<>("perPartitionCount", Long.class));

OperatorStateStore would not be per-key state data structure since it applies to non-keyed state. 

Is my understanding correct here?

Thanks,

Chirag