binlijin created FLINK-9225:
-------------------------------
Summary: Minor code comments fix in RuntimeContext
Key: FLINK-9225
URL:
https://issues.apache.org/jira/browse/FLINK-9225 Project: Flink
Issue Type: Bug
Reporter: binlijin
* <pre>{@code
* DataStream<MyType> stream = ...;
* KeyedStream<MyType> keyedStream = stream.keyBy("id");
*
* keyedStream.map(new RichMapFunction<MyType, Tuple2<MyType, Long>>() {
*
* private ValueState<Long> count;
*
* public void open(Configuration cfg) {
* state = getRuntimeContext().getState(
* new ValueStateDescriptor<Long>("count", LongSerializer.INSTANCE, 0L));
* }
*
* public Tuple2<MyType, Long> map(MyType value) {
* long count = state.value() + 1;
* state.update(value);
* return new Tuple2<>(value, count);
* }
* });
* }</pre>
"private ValueState<Long> count;" should be "private ValueState<Long> state;"
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)