0

I want to find the Processing time in Flink by below-mentioned code

  JobExecutionResult jobExecutionResult = envrionment.execute("CEP engine ");

   System.out.println("Processing time = " + jobExecutionResult.getNetRuntime(TimeUnit.MILLISECONDS));

But the problem here is that I don't know how to stop Flink program when the certain number of complex events are generated. I will elaborate the scenario in detail

Scenario: Flink program is receiving Heart rate, Respiration rate, and other stream data and is generating Heart attack warnings. Sensor data is generated using some distributions.

  1. The first task is to stop the engine when 3 consecutive warnings have been generated and find processing times of engine?

  2. The second task is to generate the Data streams at the certain rate? Incumbently, Flink program is reading various sensor data from a file and generating stream from that and send that Steam data to Kafka which is then sent to Flink Program. Can someone tell me how can I generate raw streams at the rate of x events/second?

Amarjit Dhillon
  • 2,718
  • 3
  • 23
  • 62
  • 1
    I believe it is not possible with Flink CEP as it is intended for a continously running jobs. – Dawid Wysakowicz Aug 25 '17 at 13:37
  • I dont think you can stop engine neither. But you can do somehing when when 3 consecutive warnings have been generated with method `.until` in Pattern. – Leyla Lee Feb 01 '18 at 10:34

0 Answers0