Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

But I believe that this is acceptable to the user since the source operators and downstream operators and now chaining together, which means that although memory usage could increase fo a bit, the network consumption is saved.

Another motivation of such wrapped KeyedStreamRecord is that the key and KeyGroup are selected and computed twice in both of the upstream and downstream operators currently. This unnecessary consumption could be even more if the keys of the stream do not change within a taskOnce for selecting a downstream channel and once for selecting the partitioned state. Savings can be made by passing the keyed information to downstream operators with some use cases that the key selection is complicated. But it could be 's another topic and this FLIP would not mention discuss this too much.

One more change modification is that the because key group groups are now statically computed and assigned statically, therefore, no setting allocated, there is no set method of the a key group in KeyedStateBackend and now it is provided added in the KeyedStateBackendFLIP. 

Code Block
languagejava
titleKeyedStateBackend
public interface KeyedStateBackend<K>
        extends KeyedStateFactory, PriorityQueueSetFactory, Disposable {
	/**
     * Sets the current key and its corresponding keyGroup that are used for partitioned state.
     *
     * @param newKey The new current key.
     * @param keyGroup The keyGroup of added new key.
     */
	void setCurrentKeyAndKeyGroup(K newKey, int keyGroup);}

...