Michael
Michael

Reputation: 3366

Flink apply vs process

Both functions of WindowedStream: .apply and .process has the same description. The only difference I've found was that: .apply receives Context whereas .proccess receives Window.

What should one consider when deciding between apply and process?

Upvotes: 2

Views: 1128

Answers (1)

David Anderson
David Anderson

Reputation: 43707

The newer process method is passed a Context, which contains the Window and other useful fields. This subsumes the apply method, which is passed the Window. There is no good reason to use apply, it has simply been retained for backwards compatibility.

Upvotes: 3

Related Questions