Updated on 2022-08-16 GMT+08:00

Scenarios

Scenarios

Assume that you want to collect data volume in the window covering preceding 4 seconds at the interval of one second, and achieve strict consistency of status. In this case, when the application is recovered from failure, all operator statuses are the same.

Data Planning

  1. Customized operators generate about 10000 pieces of data per second.
  2. Generated data is of four tuples (Long, String, String, Integer).
  3. Statistic results are printed on the devices.
  4. Printed data is of the long type.

Development Approach

  1. The source operator sends 10000 pieces of data and injects the data to the window operator every second.
  2. The window operator calculates the data volume of preceding 4 seconds at the interval of one second.
  3. The statistics is printed to the device at the interval of one second. Please refer to the specificViewing the Debugging Result
  4. The checkpoint is triggered at the interval of 6 seconds and the checkpoint result is stored in HDFS.