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.
The first task is to stop the engine when 3 consecutive warnings have been generated and find processing times of engine?
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?