CoProcessFunction processElement1 and processElement2

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

CoProcessFunction processElement1 and processElement2

min.tan

Hi,

 

Can someone confirm that the processElement1 and processElement2 are run sequentially?  not  in paradelle.

 

Thank you very much in advance.

 

Regards,

 

Min



E-mails can involve SUBSTANTIAL RISKS, e.g. lack of confidentiality, potential manipulation of contents and/or sender's address, incorrect recipient (misdirection), viruses etc. Based on previous e-mail correspondence with you and/or an agreement reached with you, UBS considers itself authorized to contact you via e-mail. UBS assumes no responsibility for any loss or damage resulting from the use of e-mails.
The recipient is aware of and accepts the inherent risks of using e-mails, in particular the risk that the banking relationship and confidential information relating thereto are disclosed to third parties.
UBS reserves the right to retain and monitor all messages. Messages are protected and accessed only in legally justified cases.
For information on how UBS uses and discloses personal data, how long we retain it, how we keep it secure and your data protection rights, please see our Privacy Notice http://www.ubs.com/privacy-statement
Reply | Threaded
Open this post in threaded view
|

Re: CoProcessFunction processElement1 and processElement2

jaswin.shah@outlook.com
They are designed to avoid race condition.


From: Tan, Min <[hidden email]>
Sent: Sunday, November 1, 2020 2:15:54 AM
To: user <[hidden email]>
Subject: CoProcessFunction processElement1 and processElement2
 

Hi,

 

Can someone confirm that the processElement1 and processElement2 are run sequentially?  not  in paradelle.

 

Thank you very much in advance.

 

Regards,

 

Min

Reply | Threaded
Open this post in threaded view
|

Re: CoProcessFunction processElement1 and processElement2

Arvid Heise-3
Hi Min,

all methods in your user-defined function are always run in the same thread - they cannot occur simultaneously. That includes all functions related to state management (snapshotState, initializeState), life-cycle (open, close), and timers.

To support multiple slots per machine, Flink maintains a thread per subtask and creates a copy of your user-defined function for each subtask.

Best,

Arvid

On Sat, Oct 31, 2020 at 10:57 PM Jaswin Shah <[hidden email]> wrote:
They are designed to avoid race condition.


From: Tan, Min <[hidden email]>
Sent: Sunday, November 1, 2020 2:15:54 AM
To: user <[hidden email]>
Subject: CoProcessFunction processElement1 and processElement2
 

Hi,

 

Can someone confirm that the processElement1 and processElement2 are run sequentially?  not  in paradelle.

 

Thank you very much in advance.

 

Regards,

 

Min



--

Arvid Heise | Senior Java Developer


Follow us @VervericaData

--

Join Flink Forward - The Apache Flink Conference

Stream Processing | Event Driven | Real Time

--

Ververica GmbH | Invalidenstrasse 115, 10115 Berlin, Germany

--

Ververica GmbH
Registered at Amtsgericht Charlottenburg: HRB 158244 B
Managing Directors: Timothy Alexander Steinert, Yip Park Tung Jason, Ji (Toni) Cheng