You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Chirag Dewan <ch...@yahoo.in> on 2019/02/15 05:31:04 UTC

Incorrect Javadoc in CheckpointedFunction.java?

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

Re: Incorrect Javadoc in CheckpointedFunction.java?

Posted by Congxian Qiu <qc...@gmail.com>.
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`

[1] https://github.com/apache/flink/blob/00fe8a01192a523544d3868360a924863a69d8f8/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/checkpoint/CheckpointedFunction.java#L83

Best, Congxian
On Feb 15, 2019, 13:39 +0800, Chirag Dewan <ch...@yahoo.in>, 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