Re: Apache Flink - Question about broadcast state pattern usage

2019-04-15 Thread Fabian Hueske
Hi, I think your understanding is correct. Having multiple map states for a broadcasted stream gives more flexibility. You can have states of different key and value types and store completely different information in them. Fabian Am Fr., 12. Apr. 2019 um 20:30 Uhr schrieb M Singh : > Hi Fabi

Re: Apache Flink - Question about broadcast state pattern usage

2019-04-12 Thread M Singh
Hi Fabian:  Thanks for your answer. >From my understanding (please correct me), in the example above, we are >passing map descriptors to the same broadcast stream.  So, the elements/items >in that stream will be the same.  The only difference would be that in the >processBroadcastElement meth

Re: Apache Flink - Question about broadcast state pattern usage

2019-04-11 Thread Fabian Hueske
Hi, you would simply pass multiple MapStateDescriptors to the broadcast method: MapStateDescriptor bcState1 = ... MapStateDescriptor bcState2 = ... DataStream stream = ... BroadcastStream bcStream = stream.broadcast(bcState1, bcState2); Best, Fabian Am Mi., 10. Apr. 2019 um 19:44 Uhr schrieb

Re: Apache Flink - Question about broadcast state pattern usage

2019-04-10 Thread M Singh
Hi Guowei; Thanks for your answer. Do you have any example which illustrates using broadcast is used with multiple descriptors ? Thanks On Sunday, April 7, 2019, 10:10:15 PM EDT, Guowei Ma wrote: Hi1. I think you could use "Using Managed Operator State"[1] (context.getOperatorState

Re: Apache Flink - Question about broadcast state pattern usage

2019-04-07 Thread Guowei Ma
Hi 1. I think you could use "Using Managed Operator State"[1] (context.getOperatorStateStore().getBroadcastState()) to use the BroadCastState. But you must use it very carefully and guarantee the semantics of broadcast state yourself. I think "The Broadcast State Pattern"[2] is some best practice