1

我正在尝试理解这个 Flink CEP 示例

https://github.com/tillrohrmann/cep-monitoring ..我在分布式模式(1 个主设备和 3 个核心)上执行了 Flink CEP 的这个示例。现在我正在将输出写入文件,因此我的输出被写入3 个文件,因为使用 3 个核心。在其中一个文件中,我看到记录如下:

TemperatureAlert(4), For Temperature:110.60808293330018,At Timestamp : 1464259424016
TemperatureAlert(4), For Temperature:102.75469017603604,At Timestamp : 1464259486205
TemperatureAlert(4), For Temperature:110.98650912782037,At Timestamp : 1464259492214
TemperatureAlert(4), For Temperature:115.47245702561352,At Timestamp : 1464259554901
TemperatureAlert(1), For Temperature:113.65291115679136,At Timestamp : 1464259735252
TemperatureAlert(1), For Temperature:110.88374917920495,At Timestamp : 1464259795436
TemperatureAlert(1), For Temperature:116.23995588293668,At Timestamp : 1464259810056
TemperatureAlert(4), For Temperature:103.27459440260448,At Timestamp : 1464259929121
TemperatureAlert(1), For Temperature:114.53029859331343,At Timestamp : 1464259942139
TemperatureAlert(4), For Temperature:109.13921010205338,At Timestamp : 1464260060204
(4,117.14184470661019) ,1464259692594
TemperatureWarning(4,115.08289903597866) ,1464259701806
TemperatureWarning(4,113.9136297471108) ,1464259723436
TemperatureWarning(1,112.15684481878216) ,1464259733249
TemperatureWarning(1,113.65291115679136) ,1464259735252
TemperatureWarning(1,125.07387226846537) ,1464259770401
TemperatureWarning(1,100.829623781131) ,1464259776409
TemperatureWarning(4,105.76155716070109) ,1464259789027
TemperatureWarning(1,110.88374917920495) ,1464259795436
TemperatureWarning(1,110.03271176117211) ,1464259803447
TemperatureWarning(1,108.99904165096143) ,1464259809255
TemperatureWarning(1,116.23995588293668) ,1464259810056
TemperatureWarning(1,113.74475027506949) ,1464259815664
TemperatureWarning(4,118.65623814713382) ,1464259826078
TemperatureWarning(1,125.24779125130385) ,1464259877349
TemperatureWarning(4,110.38935504983476) ,1464259890467
TemperatureWarning(4,101.92222208289115) ,1464259927319
TemperatureWarning(4,103.27459440260448) ,1464259929121
TemperatureWarning(1,113.15048106140453) ,1464259937533
TemperatureWarning(1,114.53029859331343) ,1464259942139
TemperatureWarning(4,112.4172409140119) ,1464259953755
TemperatureWarning(1,107.21833971444117) ,1464259981194
TemperatureWarning(1,105.08408728033956) ,1464259981594
TemperatureWarning(4,108.83063471822507) ,1464259990608
TemperatureWarning(4,127.9723904319025) ,1464260054997
TemperatureWarning(4,106.06561268720989) ,1464260059804
TemperatureWarning(4,109.13921010205338) ,1464260060204 

现在,如果我们从第 5 行开始查看。我们可以检查从第 5 行打印的所有TemperatureAlerts(即温度:113.65291115679136),我们可以在 TemperatureWarning 中识别以下温度(温度:113.65291115679136 出现在第 15 行意思是我们可以识别哪些温度,警报已被打印....但是从第 1 行到第 4 行生成的警报呢?您甚至可以在行号中找到相同的记录。11 ..我的意思是我们如何识别已生成警报的温度警告?它是以批处理模式、连续模式还是微批处理模式执行流式传输?

4

1 回答 1

1
  1. 当在 10 秒窗口内从同一机架 ID 出现两个连续的 TemperatureEvents 时,会生成 TemperatureWarning。

  2. 当同一机架 ID 在 20 秒窗口内出现两个连续的 TemperatureWarnings 并且 TemperatureWarnings temp 似乎正在增加时,会生成 TemperatureAlert。TemperatureAlert 有第一个 TemperatureWarning 的数据

  3. 它是连续流源

于 2016-07-01T01:49:34.490 回答