Mapstatedescriptor

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

Mapstatedescriptor

Szymon Szczypiński


Hi, i have a question about MapStateDescriptor used to create MapState.
I have a keyed stream and ProcessWindowFunction where I want to use MapState. And the question is that in MapStateDescriptor constructor

public MapStateDescriptor(String name, Class<UK> keyClass, Class<UV> valueClass)

the "name" must be unique for each key or this is only the name/description.

Best Regards
Szymon




Reply | Threaded
Open this post in threaded view
|

Re: Mapstatedescriptor

Dominik Wosiński
Hey,
It's the name for the whole descriptor. Not the keys, it means that no other descriptor should be created with the same name.

Best Regards,
Dom.

Sob., 13.10.2018, 09:50 użytkownik Szymon <[hidden email]> napisał:


Hi, i have a question about MapStateDescriptor used to create MapState.
I have a keyed stream and ProcessWindowFunction where I want to use MapState. And the question is that in MapStateDescriptor constructor

public MapStateDescriptor(String name, Class<UK> keyClass, Class<UV> valueClass)

the "name" must be unique for each key or this is only the name/description.

Best Regards
Szymon




Reply | Threaded
Open this post in threaded view
|

Re: Mapstatedescriptor

Kostas Kloudas
Hi Szymon,

Dominik is right. The “name” refers to the whole state described by the specified descriptor.

Kostas

On Oct 13, 2018, at 10:30 AM, Dominik Wosiński <[hidden email]> wrote:

Hey,
It's the name for the whole descriptor. Not the keys, it means that no other descriptor should be created with the same name.

Best Regards,
Dom.

Sob., 13.10.2018, 09:50 użytkownik Szymon <[hidden email]> napisał:


Hi, i have a question about MapStateDescriptor used to create MapState.
I have a keyed stream and ProcessWindowFunction where I want to use MapState. And the question is that in MapStateDescriptor constructor

public MapStateDescriptor(String name, Class<UK> keyClass, Class<UV> valueClass)

the "name" must be unique for each key or this is only the name/description.

Best Regards
Szymon