1
votes

I am using Flink 1.4.1 and I am using CEP. I have to calculate lifetime order amount by the same user in each order.

So when I sending orders Order A -> amount: 500, Order B -> amount: 200, Order C -> amount: 300 and calculating key by the user using states. Sometime in Order B, it's showing 700 and sometimes 200.

Means sometimes it's adding order A in B, sometimes not. I am running code in 6 parallelisms. Is this parallelism issue or distributed state issue?

When I run the whole program with the single parallelism, then the program behaves correctly and shows the correct result.

Regards, Pranjal

I don't think we can diagnose this issue without more information. Can you share the code, or a simple example that illustrates the problem? But from what you have said so far, I don't see any reason to use CEP. This sounds like a simple pipeline with keyBy(user) and sum(amount) operations.David Anderson