MapState in flink

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

MapState in flink

jaswin.shah@outlook.com
Hi,
Can anyone please help me on how can I create a MapState of ListState in flink, does flink support the same and if supports, how to declare the descriptor for same state data structure?
If it is not supported, how may I create similar datastructure for state in flink?

Thanks,
Jaswin
Reply | Threaded
Open this post in threaded view
|

Re: MapState in flink

jaswin.shah@outlook.com
I need some representation like this:



From: Jaswin Shah <[hidden email]>
Sent: 14 June 2020 01:01
To: [hidden email] <[hidden email]>
Subject: MapState in flink
 
Hi,
Can anyone please help me on how can I create a MapState of ListState in flink, does flink support the same and if supports, how to declare the descriptor for same state data structure?
If it is not supported, how may I create similar datastructure for state in flink?

Thanks,
Jaswin
Reply | Threaded
Open this post in threaded view
|

Re: MapState in flink

Oytun Tez
Correct me @everyone if I'm wrong, but you cannot keep State inside State in that way. So change your signature to: MapState<String, List<...>>

The underlying mechanism wouldn't make sense in this state-inside-state shape.



 --

MotaWord
Oytun Tez
M O T A W O R D CTO & Co-Founder
[hidden email]
     


On Sat, Jun 13, 2020 at 3:32 PM Jaswin Shah <[hidden email]> wrote:
I need some representation like this:



From: Jaswin Shah <[hidden email]>
Sent: 14 June 2020 01:01
To: [hidden email] <[hidden email]>
Subject: MapState in flink
 
Hi,
Can anyone please help me on how can I create a MapState of ListState in flink, does flink support the same and if supports, how to declare the descriptor for same state data structure?
If it is not supported, how may I create similar datastructure for state in flink?

Thanks,
Jaswin
Reply | Threaded
Open this post in threaded view
|

Re: MapState in flink

Congxian Qiu
Hi

Could you please share why you need `MapState<String, ListState>` instead of `MapState<String, List<...>>` 

Best,
Congxian


Oytun Tez <[hidden email]> 于2020年6月14日周日 上午3:39写道:
Correct me @everyone if I'm wrong, but you cannot keep State inside State in that way. So change your signature to: MapState<String, List<...>>

The underlying mechanism wouldn't make sense in this state-inside-state shape.



 --

MotaWord
Oytun Tez
M O T A W O R D CTO & Co-Founder
[hidden email]
     


On Sat, Jun 13, 2020 at 3:32 PM Jaswin Shah <[hidden email]> wrote:
I need some representation like this:



From: Jaswin Shah <[hidden email]>
Sent: 14 June 2020 01:01
To: [hidden email] <[hidden email]>
Subject: MapState in flink
 
Hi,
Can anyone please help me on how can I create a MapState of ListState in flink, does flink support the same and if supports, how to declare the descriptor for same state data structure?
If it is not supported, how may I create similar datastructure for state in flink?

Thanks,
Jaswin